Previous topic

propy.weakref_property

Next topic

propy.lookup_property

This Page

propy.array_property

propy.array_property(name, **kwargs)[source]

Creates a class property that converts input data to a NumPy array. To use, place the method within the class’s scope.

Parameters:
name : str

The name of the property to be created.

kwargs

Keyword arguments that will be passed to numpy.asarray().

Examples

>>> class Class():
...     property1 = array_property('property1', dtype='float')