Typedefs | |
typedef std::map< PyArray_TYPES, char > | KindCharMap |
Mapping from a PyArray_TYPE to its corresponding typeID in char. | |
typedef KindCharMap::value_type | KindCharMapEntry |
typedef std::map< PyArray_TYPES, std::string > | KindStringMap |
Mapping from a PyArray_TYPE to its corresponding name in string. | |
typedef KindStringMap::value_type | KindStringMapEntry |
typedef std::map< char, PyArray_TYPES > | KindTypeMap |
Mapping from a typeID to its corresponding PyArray_TYPE. | |
typedef KindTypeMap::value_type | KindTypeMapEntry |
Functions | |
numeric::array | astype (boost::python::numeric::array arr, PyArray_TYPES t) |
Returns a clone of this array with a new type. | |
PyArray_TYPES | char2type (char e_type) |
Coverts a single character typecode to its PyArray_TYPES. | |
void | check_contiguous (boost::python::numeric::array arr) |
Throws an exception if the array is not contiguous. | |
void | check_contiguous (numeric::array arr) |
void | check_dim (boost::python::numeric::array arr, int dimnum, int dimsize) |
Throws an exception if a specific dimension from a Numeric array does not match the expected size. | |
void | check_PyArrayElementType (boost::python::object newo) |
Throws an exception if the element of a Numeric array is type casted to PyArray_OBJECT. | |
void | check_PyArrayElementType (object newo) |
void | check_rank (boost::python::numeric::array arr, int expected_rank) |
Throws an exception if the actual rank is not equal to the expected rank. | |
void | check_shape (boost::python::numeric::array arr, std::vector< int > expected_dims) |
Throws an exception if the actual dimensions of the array are not equal to the expected dimensions. | |
void | check_size (boost::python::numeric::array arr, int expected_size) |
Throw an exception if the actual total size of the array is not equal to the expected size. | |
void | check_size_match (std::vector< int > dims, int n) |
Throws an exception if the total size computed from a vector of integer does not match with the expected size. | |
void | check_type (boost::python::numeric::array arr, PyArray_TYPES expected_type) |
Throws an exception if the actual array type is not equal to the expected type. | |
boost::python::numeric::array | clone (boost::python::numeric::array arr) |
Returns a clone of this array. | |
numeric::array | clone (numeric::array arr) |
void | copy_data (boost::python::numeric::array arr, char *new_data) |
Copies data into the array. | |
char * | data (boost::python::numeric::array arr) |
Returns a pointer to the data in the array. | |
char * | data (numeric::array arr) |
int | get_dim (boost::python::numeric::array arr, int dimnum) |
Returns the size of a specific dimension. | |
bool | iscontiguous (boost::python::numeric::array arr) |
Returns true if the array is contiguous. | |
bool | iscontiguous (numeric::array arr) |
static KindCharMap | kindchars (kindCharMapEntries, kindCharMapEntries+numCharEntries) |
static KindStringMap | kindstrings (kindStringMapEntries, kindStringMapEntries+numStringEntries) |
static KindTypeMap | kindtypes (kindTypeMapEntries, kindTypeMapEntries+numTypeEntries) |
boost::python::numeric::array | makeNum (const boost::python::numeric::array &arr) |
Creates a Numeric array from a Numeric array, referencing the data. | |
boost::python::numeric::array | makeNum (boost::python::object x) |
A free function that extracts a PyArrayObject from any sequential PyObject. | |
numeric::array | makeNum (const numeric::array &arr) |
numeric::array | makeNum (double *data, std::vector< int > dims) |
Creates a n-dimensional Numeric array with dimensions dims and an array of double. | |
numeric::array | makeNum (float *data, std::vector< int > dims) |
Creates a n-dimensional Numeric array with dimensions dims and an array of float number. | |
numeric::array | makeNum (int *data, std::vector< int > dims) |
Creates a n-dimensional Numeric array with dimensions dims and an array of integer. | |
numeric::array | makeNum (short *data, std::vector< int > dims) |
Creates a n-dimensional Numeric array with dimensions dims and an array of 16-bits. | |
numeric::array | makeNum (char *data, std::vector< int > dims) |
Creates a n-dimensional Numeric array with dimensions dims and an array of 8-bits. | |
numeric::array | makeNum (double *data, int n=0) |
Creates an one-dimensional Numeric array from a double array of size n. | |
numeric::array | makeNum (float *data, int n=0) |
Creates an one-dimensional Numeric array from a float array of size n. | |
numeric::array | makeNum (int *data, int n=0) |
Creates an one-dimensional Numeric array from an integer array of size n. | |
numeric::array | makeNum (std::vector< int > dimens, PyArray_TYPES t=PyArray_DOUBLE) |
Creates a n-dimensional Numeric array with dimensions dimens and Numeric type t. | |
numeric::array | makeNum (int n, PyArray_TYPES t=PyArray_DOUBLE) |
Creates an one-dimensional Numeric array of length n and Numeric type t. | |
numeric::array | makeNum (object x) |
int | rank (boost::python::numeric::array arr) |
A free function that retrieves the number of dimensions of a Numeric array. | |
int | rank (numeric::array arr) |
int | refcount (boost::python::numeric::array arr) |
Returns the reference count of the array. | |
int | refcount (numeric::array arr) |
void | savespace (boost::python::numeric::array arr, bool set_savespace) |
Changes the savespace property of the array. | |
void | savespace (numeric::array arr, bool set_savespace=true) |
std::vector< int > | shape (boost::python::numeric::array arr) |
Returns the dimensions in a vector. | |
std::vector< int > | shape (numeric::array arr) |
int | size (boost::python::numeric::array arr) |
A free function that returns the total size of the array. | |
int | size (numeric::array arr) |
bool | spacesaver (boost::python::numeric::array arr) |
Returns true if the array is a spacesaver array. | |
bool | spacesaver (numeric::array arr) |
std::vector< int > | strides (boost::python::numeric::array arr) |
Returns the strides array in a vector of integer. | |
std::vector< int > | strides (numeric::array arr) |
PyArray_TYPES | type (boost::python::numeric::array arr) |
A free function that retrieves the Numeric type of a Numeric array. | |
PyArray_TYPES | type (numeric::array arr) |
char | type2char (PyArray_TYPES t_type) |
Converts a PyArray_TYPE to its single character typecode. | |
std::string | type2string (PyArray_TYPES t_type) |
Converts a PyArray_TYPE to its name in string. | |
template<class T> | |
std::string | vector_str (const std::vector< T > &vec) |
Constructs a string which contains a list of elements extracted from the input vector. | |
Variables | |
KindCharMapEntry | kindCharMapEntries [] |
KindStringMapEntry | kindStringMapEntries [] |
KindTypeMapEntry | kindTypeMapEntries [] |
int | numCharEntries = sizeof(kindCharMapEntries)/sizeof(KindCharMapEntry) |
int | numStringEntries = sizeof(kindStringMapEntries)/sizeof(KindStringMapEntry) |
int | numTypeEntries = sizeof(kindTypeMapEntries)/sizeof(KindTypeMapEntry) |
|
Mapping from a PyArray_TYPE to its corresponding typeID in char.
Definition at line 300 of file num_util.h. |
|
Definition at line 27 of file num_util.cpp. |
|
Mapping from a PyArray_TYPE to its corresponding name in string.
Definition at line 295 of file num_util.h. |
|
Definition at line 9 of file num_util.cpp. |
|
Mapping from a typeID to its corresponding PyArray_TYPE.
Definition at line 305 of file num_util.h. |
|
Definition at line 43 of file num_util.cpp. |
|
Returns a clone of this array with a new type.
Definition at line 347 of file num_util.cpp. References type2char(). |
|
Coverts a single character typecode to its PyArray_TYPES.
Definition at line 415 of file num_util.cpp. References kindtypes(). Referenced by type(). |
|
Throws an exception if the array is not contiguous.
|
|
Definition at line 312 of file num_util.cpp. References iscontiguous(). |
|
Throws an exception if a specific dimension from a Numeric array does not match the expected size.
Definition at line 293 of file num_util.cpp. References shape(). |
|
Throws an exception if the element of a Numeric array is type casted to PyArray_OBJECT.
|
|
Definition at line 393 of file num_util.cpp. Referenced by makeNum(). |
|
Throws an exception if the actual rank is not equal to the expected rank.
Definition at line 220 of file num_util.cpp. References rank(). |
|
Throws an exception if the actual dimensions of the array are not equal to the expected dimensions.
Definition at line 281 of file num_util.cpp. References shape(), and vector_str(). |
|
Throw an exception if the actual total size of the array is not equal to the expected size.
Definition at line 241 of file num_util.cpp. References size(). Referenced by from_python_sequence< ContainerType, ConversionPolicy >::convertible(). |
|
Throws an exception if the total size computed from a vector of integer does not match with the expected size.
Definition at line 432 of file num_util.cpp. |
|
Throws an exception if the actual array type is not equal to the expected type.
Definition at line 198 of file num_util.cpp. References kindstrings(), and type(). |
|
Returns a clone of this array.
|
|
Definition at line 340 of file num_util.cpp. References makeNum(). |
|
Copies data into the array.
Definition at line 330 of file num_util.cpp. References data(). |
|
Returns a pointer to the data in the array.
|
|
|
Returns the size of a specific dimension.
Definition at line 267 of file num_util.cpp. |
|
Returns true if the array is contiguous.
|
|
Definition at line 306 of file num_util.cpp. Referenced by check_contiguous(). |
|
Referenced by type2char(). |
|
Referenced by check_type(), and type2string(). |
|
Referenced by char2type(). |
|
Creates a Numeric array from a Numeric array, referencing the data.
|
|
A free function that extracts a PyArrayObject from any sequential PyObject.
|
|
Definition at line 188 of file num_util.cpp. |
|
Creates a n-dimensional Numeric array with dimensions dims and an array of double.
Definition at line 175 of file num_util.cpp. |
|
Creates a n-dimensional Numeric array with dimensions dims and an array of float number.
Definition at line 162 of file num_util.cpp. |
|
Creates a n-dimensional Numeric array with dimensions dims and an array of integer.
Definition at line 149 of file num_util.cpp. |
|
Creates a n-dimensional Numeric array with dimensions dims and an array of 16-bits.
Definition at line 136 of file num_util.cpp. |
|
Creates a n-dimensional Numeric array with dimensions dims and an array of 8-bits.
Definition at line 123 of file num_util.cpp. |
|
Creates an one-dimensional Numeric array from a double array of size n.
Definition at line 116 of file num_util.cpp. |
|
Creates an one-dimensional Numeric array from a float array of size n.
Definition at line 109 of file num_util.cpp. |
|
Creates an one-dimensional Numeric array from an integer array of size n.
Definition at line 101 of file num_util.cpp. |
|
Creates a n-dimensional Numeric array with dimensions dimens and Numeric type t. The elements of the array are initialized to zero.
Definition at line 95 of file num_util.cpp. |
|
Creates an one-dimensional Numeric array of length n and Numeric type t. The elements of the array are initialized to zero.
Definition at line 89 of file num_util.cpp. |
|
Definition at line 77 of file num_util.cpp. References check_PyArrayElementType(). Referenced by clone(), PyDataSource::columnAsNumArray(), and QtRootNTuple::valueAt(). |
|
A free function that retrieves the number of dimensions of a Numeric array.
|
|
Definition at line 212 of file num_util.cpp. Referenced by check_rank(), get_dim(), RTuple::operator[](), NTuple::operator[](), shape(), and strides(). |
|
Returns the reference count of the array.
|
|
Definition at line 389 of file num_util.cpp. |
|
Changes the savespace property of the array.
|
|
Definition at line 359 of file num_util.cpp. |
|
Returns the dimensions in a vector.
|
|
|
A free function that returns the total size of the array.
|
|
|
Returns true if the array is a spacesaver array.
|
|
Definition at line 351 of file num_util.cpp. |
|
Returns the strides array in a vector of integer.
|
|
Definition at line 375 of file num_util.cpp. References rank(). |
|
A free function that retrieves the Numeric type of a Numeric array.
|
|
|
Converts a PyArray_TYPE to its single character typecode.
Definition at line 411 of file num_util.cpp. References kindchars(). Referenced by astype(). |
|
Converts a PyArray_TYPE to its name in string.
Definition at line 407 of file num_util.cpp. References kindstrings(). |
|
Constructs a string which contains a list of elements extracted from the input vector.
Definition at line 420 of file num_util.cpp. Referenced by check_shape(). |
|
Initial value: { KindCharMapEntry(PyArray_CHAR, 'c'), KindCharMapEntry(PyArray_UBYTE, 'b'), KindCharMapEntry(PyArray_SBYTE, '1'), KindCharMapEntry(PyArray_SHORT, 's'), KindCharMapEntry(PyArray_INT, 'i'), KindCharMapEntry(PyArray_LONG, 'l'), KindCharMapEntry(PyArray_FLOAT, 'f'), KindCharMapEntry(PyArray_DOUBLE, 'd'), KindCharMapEntry(PyArray_CFLOAT, 'F'), KindCharMapEntry(PyArray_CDOUBLE,'D'), KindCharMapEntry(PyArray_OBJECT, 'O') } Definition at line 28 of file num_util.cpp. |
|
Initial value: { KindStringMapEntry(PyArray_CHAR, "PyArray_CHAR"), KindStringMapEntry(PyArray_UBYTE, "PyArray_UBYTE"), KindStringMapEntry(PyArray_SBYTE, "PyArray_SBYTE"), KindStringMapEntry(PyArray_SHORT, "PyArray_SHORT"), KindStringMapEntry(PyArray_INT, "PyArray_INT"), KindStringMapEntry(PyArray_LONG, "PyArray_LONG"), KindStringMapEntry(PyArray_FLOAT, "PyArray_FLOAT"), KindStringMapEntry(PyArray_DOUBLE, "PyArray_DOUBLE"), KindStringMapEntry(PyArray_CFLOAT, "PyArray_CFLOAT"), KindStringMapEntry(PyArray_CDOUBLE,"PyArray_CDOUBLE"), KindStringMapEntry(PyArray_OBJECT, "PyArray_OBJECT"), KindStringMapEntry(PyArray_NOTYPE ,"PyArray_NOTYPE") } Definition at line 10 of file num_util.cpp. |
|
Initial value: { KindTypeMapEntry('c',PyArray_CHAR), KindTypeMapEntry('b',PyArray_UBYTE), KindTypeMapEntry('1',PyArray_SBYTE), KindTypeMapEntry('s',PyArray_SHORT), KindTypeMapEntry('i',PyArray_INT), KindTypeMapEntry('l',PyArray_LONG), KindTypeMapEntry('f',PyArray_FLOAT), KindTypeMapEntry('d',PyArray_DOUBLE), KindTypeMapEntry('F',PyArray_CFLOAT), KindTypeMapEntry('D',PyArray_CDOUBLE), KindTypeMapEntry('O',PyArray_OBJECT) } Definition at line 44 of file num_util.cpp. |
|
Definition at line 61 of file num_util.cpp. |
|
Definition at line 60 of file num_util.cpp. |
|
Definition at line 62 of file num_util.cpp. |