πΉ Widgetsο
Settingsο
- class fibermat.utils.widgets.Settings(n=0, length=25.0, width=1.0, thickness=1.0, size=50.0, theta=1.0, shear=1.0, tensile=inf, seed=0, periodic=True, threshold=None, packing=1.0, itermax=1000, tol=1e-06, lmin=None, lmax=None, coupling=1.0, interp_size=None, verbose=True)ο
A class for setting parameters in Jupyter notebooks.
Methodsο
__iter__()Iterate over widgets.
__getitem__()Get the value of a given widget.
__setitem__()Set the value of a given widget.
__call__()Display widgets for setting parameters.
- __call__(**kwargs)ο
Display widgets for setting parameters with syntax self(**kwargs).
Other Parametersο
- kwargs :
Additional keyword arguments to set widget values.
- __getitem__(name)ο
Get the value of a given widget with syntax self[name] and **self.
Parametersο
- namestr
Name of the widget.
Notesο
Required for bracket accessor and double star operator.
- __iter__()ο
Iterate over widgets with syntax *self.
Returnsο
- iterator
Set of widgets as iterator.
Notesο
Required for single star operator.
- __setitem__(name, value)ο
Set the value of a given widget with syntax self[name] = value.
Parametersο
- namestr
Name of the widget.
- valueAny
Value of the widget.
Notesο
Required for bracket accessor and setting via
__call__()method.
Exampleο
See jupyter-notebook.ipynb.