#include "num_util.h"
Include dependency graph for num_util.cpp:
Go to the source code of this file.
Namespaces | |
namespace | num_util |
Defines | |
#define | NO_IMPORT_ARRAY |
#define | PY_ARRAY_UNIQUE_SYMBOL HippoPyArrayHandle |
Typedefs | |
typedef KindCharMap::value_type | KindCharMapEntry |
typedef KindStringMap::value_type | KindStringMapEntry |
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 (numeric::array arr) |
void | check_dim (boost::python::numeric::array arr, int dimnum, intp dimsize) |
Throws an exception if a specific dimension from a numpy array does not match the expected size. | |
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< intptr_t > expected_dims) |
void | check_size (boost::python::numeric::array arr, intp 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< intp > dims, intp 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. | |
numeric::array | clone (numeric::array arr) |
void | copy_data (boost::python::numeric::array arr, char *new_data) |
Copies data into the array. | |
void * | data (numeric::array arr) |
intp | get_dim (boost::python::numeric::array arr, int dimnum) |
Returns the size of a specific dimension. | |
template<> | |
PyArray_TYPES | getEnum< double > (void) |
template<> | |
PyArray_TYPES | getEnum< float > (void) |
template<> | |
PyArray_TYPES | getEnum< int > (void) |
template<> | |
PyArray_TYPES | getEnum< long > (void) |
template<> | |
PyArray_TYPES | getEnum< short > (void) |
template<> | |
PyArray_TYPES | getEnum< signed char > (void) |
template<> | |
PyArray_TYPES | getEnum< std::complex< double > > (void) |
template<> | |
PyArray_TYPES | getEnum< std::complex< float > > (void) |
template<> | |
PyArray_TYPES | getEnum< unsigned char > (void) |
template<> | |
PyArray_TYPES | getEnum< unsigned int > (void) |
template<> | |
PyArray_TYPES | getEnum< unsigned short > (void) |
bool | iscontiguous (numeric::array arr) |
static KindCharMap | kindchars (kindCharMapEntries, kindCharMapEntries+numCharEntries) |
static KindStringMap | kindstrings (kindStringMapEntries, kindStringMapEntries+numStringEntries) |
static KindTypeMap | kindtypes (kindTypeMapEntries, kindTypeMapEntries+numTypeEntries) |
numeric::array | makeNum (const numeric::array &arr) |
numeric::array | makeNum (std::vector< int > dimens, PyArray_TYPES t) |
Creates a n-dimensional numpy array with dimensions dimens and numpy type t. | |
numeric::array | makeNum (intp n, PyArray_TYPES t) |
Creates an one-dimensional numpy array of length n and numpy type t. | |
numeric::array | makeNum (object x) |
template<> | |
boost::python::numeric::array | makeNum< double > (double *data, std::vector< int > dims) |
int | rank (numeric::array arr) |
int | refcount (numeric::array arr) |
std::vector< intptr_t > | shape (numeric::array arr) |
intp | size (numeric::array arr) |
std::vector< intp > | strides (numeric::array arr) |
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) |
const char * | rcsid = "$Id: num__util_8cpp.html,v 1.36 2007/07/26 18:21:57 pfkeb Exp $" |
#define NO_IMPORT_ARRAY |
Definition at line 7 of file num_util.cpp.
#define PY_ARRAY_UNIQUE_SYMBOL HippoPyArrayHandle |
Definition at line 6 of file num_util.cpp.
const char* rcsid = "$Id: num__util_8cpp.html,v 1.36 2007/07/26 18:21:57 pfkeb Exp $" [static] |
Definition at line 10 of file num_util.cpp.