πŸ—Ή 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.