array_serialization_wrap#

k3d.helpers.array_serialization_wrap(name: str) Dict[str, Any][source]#

Return a wrap of the serialization and deserialization functions for array objects.

Parameters:

name (str) – Name of the property.

Returns:

Dictionary with ‘to_json’ and ‘from_json’ functions.

Return type:

dict

Note

This function is used along with the ipywidgets package, which provides custom object serializations.

See ipywidgets documentation for more informations.

Examples#

# Example from objects.VoxelChunk

coord = Array(dtype=np.uint32).tag(sync=True, **array_serialization_wrap("coord"))