trait_numeric Module
Trait definitions related to the numpy library.
Classes
-
class traits.trait_numeric.AbstractArray(dtype=None, shape=None, value=None, coerce=False, typecode=None, **metadata)[source]
Abstract base class for defining numpy-based arrays.
-
validate(object, name, value)[source]
Validates that the value is a valid array.
-
info()[source]
Returns descriptive information about the trait.
-
create_editor()[source]
Returns the default UI editor for the trait.
-
get_default_value()[source]
Returns the default value constructor for the type (called from the
trait factory.
-
copy_default_value(value)[source]
Returns a copy of the default value (called from the C code on
first reference to a trait with no current value).
-
class traits.trait_numeric.Array(dtype=None, shape=None, value=None, typecode=None, **metadata)[source]
Defines a trait whose value must be a numpy array.
-
class traits.trait_numeric.ArrayOrNone(*args, **metadata)[source]
A trait whose value may be either a NumPy array or None, with
casting allowed. The default is None.
-
class traits.trait_numeric.CArray(dtype=None, shape=None, value=None, typecode=None, **metadata)[source]
Defines a trait whose value must be a numpy array, with casting
allowed.
Function
-
traits.trait_numeric.dtype2trait(dtype)[source]
Get the corresponding trait for a numpy dtype.