#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 PyArrayHandle |
Typedefs | |
typedef KindCharMap::value_type | num_util::KindCharMapEntry |
typedef KindStringMap::value_type | num_util::KindStringMapEntry |
typedef KindTypeMap::value_type | num_util::KindTypeMapEntry |
Functions | |
numeric::array | num_util::astype (boost::python::numeric::array arr, PyArray_TYPES t) |
Returns a clone of this array with a new type. | |
PyArray_TYPES | num_util::char2type (char e_type) |
Coverts a single character typecode to its PyArray_TYPES. | |
void | num_util::check_contiguous (numeric::array arr) |
void | num_util::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 | num_util::check_PyArrayElementType (object newo) |
void | num_util::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 | num_util::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 | num_util::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 | num_util::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 | num_util::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 | num_util::clone (numeric::array arr) |
void | num_util::copy_data (boost::python::numeric::array arr, char *new_data) |
Copies data into the array. | |
char * | num_util::data (numeric::array arr) |
int | num_util::get_dim (boost::python::numeric::array arr, int dimnum) |
Returns the size of a specific dimension. | |
bool | num_util::iscontiguous (numeric::array arr) |
static KindCharMap | num_util::kindchars (kindCharMapEntries, kindCharMapEntries+numCharEntries) |
static KindStringMap | num_util::kindstrings (kindStringMapEntries, kindStringMapEntries+numStringEntries) |
static KindTypeMap | num_util::kindtypes (kindTypeMapEntries, kindTypeMapEntries+numTypeEntries) |
numeric::array | num_util::makeNum (object x) |
int | num_util::rank (numeric::array arr) |
int | num_util::refcount (numeric::array arr) |
void | num_util::savespace (numeric::array arr, bool set_savespace=true) |
std::vector< int > | num_util::shape (numeric::array arr) |
int | num_util::size (numeric::array arr) |
bool | num_util::spacesaver (numeric::array arr) |
std::vector< int > | num_util::strides (numeric::array arr) |
PyArray_TYPES | num_util::type (numeric::array arr) |
char | num_util::type2char (PyArray_TYPES t_type) |
Converts a PyArray_TYPE to its single character typecode. | |
std::string | num_util::type2string (PyArray_TYPES t_type) |
Converts a PyArray_TYPE to its name in string. | |
template<class T> | |
std::string | num_util::vector_str (const std::vector< T > &vec) |
Constructs a string which contains a list of elements extracted from the input vector. | |
Variables | |
KindCharMapEntry | num_util::kindCharMapEntries [] |
KindStringMapEntry | num_util::kindStringMapEntries [] |
KindTypeMapEntry | num_util::kindTypeMapEntries [] |
int | num_util::numCharEntries = sizeof(kindCharMapEntries)/sizeof(KindCharMapEntry) |
int | num_util::numStringEntries = sizeof(kindStringMapEntries)/sizeof(KindStringMapEntry) |
int | num_util::numTypeEntries = sizeof(kindTypeMapEntries)/sizeof(KindTypeMapEntry) |
const char * | rcsid = "$Id: num_util.cpp,v 1.4 2005/04/24 23:05:01 pfkeb Exp $" |
|
Definition at line 2 of file num_util.cpp. |
|
Definition at line 1 of file num_util.cpp. |
|
Definition at line 5 of file num_util.cpp. |