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, intp dimsize) |
Throws an exception if a specific dimension from a numpy array does not match the expected size. | |
void | check_PyArrayElementType (boost::python::object newo) |
Throws an exception if the element of a numpy array is type cast 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< intp > expected_dims) |
Throws an exception if the actual dimensions of the array are not equal to the expected dimensions. | |
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. | |
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. | |
void * | data (boost::python::numeric::array arr) |
Returns a pointer to the data in 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<typename T> | |
PyArray_TYPES | getEnum () |
Function template returns PyArray_Type for C++ type See num_util.cpp for specializations. | |
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 (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 numpy array from a numpy array, referencing the data. | |
template<typename T> | |
boost::python::numeric::array | makeNum (T *data, std::vector< int > dims) |
Function template creates an n-dimensional numpy array with dimensions dimens containing a copy of values starting at data. | |
template<typename T> | |
boost::python::numeric::array | makeNum (T *data, int n=0) |
Function template creates a one-dimensional numpy array of length n containing a copy of data at 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 (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 (boost::python::numeric::array arr) |
A free function that retrieves the number of dimensions of a numpy array. | |
int | rank (numeric::array arr) |
int | refcount (boost::python::numeric::array arr) |
int | refcount (numeric::array arr) |
std::vector< intptr_t > | shape (boost::python::numeric::array arr) |
Returns the dimensions in a vector. | |
std::vector< intptr_t > | shape (numeric::array arr) |
intp | size (boost::python::numeric::array arr) |
A free function that returns the total size of the array. | |
intp | size (numeric::array arr) |
std::vector< intp > | strides (boost::python::numeric::array arr) |
Returns the strides array in a vector of integer. | |
std::vector< intp > | strides (numeric::array arr) |
PyArray_TYPES | type (boost::python::numeric::array arr) |
A free function that retrieves the numpy type of a numpy 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) |
typedef std::map<PyArray_TYPES, char> KindCharMap |
Mapping from a PyArray_TYPE to its corresponding typeID in char.
Definition at line 311 of file num_util.h.
typedef KindCharMap::value_type KindCharMapEntry |
Definition at line 163 of file num_util.cpp.
typedef std::map<PyArray_TYPES, std::string> KindStringMap |
Mapping from a PyArray_TYPE to its corresponding name in string.
Definition at line 306 of file num_util.h.
typedef KindStringMap::value_type KindStringMapEntry |
Definition at line 142 of file num_util.cpp.
typedef std::map<char, PyArray_TYPES> KindTypeMap |
typedef KindTypeMap::value_type KindTypeMapEntry |
Definition at line 182 of file num_util.cpp.
boost::python::numeric::array astype | ( | boost::python::numeric::array | arr, | |
PyArray_TYPES | t | |||
) |
Returns a clone of this array with a new type.
arr | a Boost/Python numeric array. | |
t | PyArray_TYPES of the output array. |
Definition at line 423 of file num_util.cpp.
References type2char().
PyArray_TYPES char2type | ( | char | e_type | ) |
Coverts a single character typecode to its PyArray_TYPES.
e_type | a PyArray_TYPES typecode in char. |
Definition at line 475 of file num_util.cpp.
References kindtypes().
Referenced by type().
void num_util::check_contiguous | ( | boost::python::numeric::array | arr | ) |
Throws an exception if the array is not contiguous.
arr | a Boost/Python numeric array. |
void num_util::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.
arr | a Boost/Python numeric array. | |
dimnum | an integer that specifies which dimension of 'arr' to check. | |
dimsize | an expected size of the specified dimension. |
Definition at line 361 of file num_util.cpp.
References shape().
void num_util::check_PyArrayElementType | ( | boost::python::object | newo | ) |
Throws an exception if the element of a numpy array is type cast to PyArray_OBJECT.
newo | a Boost/Python object. |
void num_util::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.
arr | a Boost/Python numeric array. | |
expected_rank | an expected rank of the numeric array. |
Definition at line 284 of file num_util.cpp.
References rank().
void num_util::check_shape | ( | boost::python::numeric::array | arr, | |
std::vector< intp > | expected_dims | |||
) |
Throws an exception if the actual dimensions of the array are not equal to the expected dimensions.
arr | a Boost/Python numeric array. | |
expected_dims | an integer vector of expected dimension. |
void num_util::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.
arr | a Boost/Python numeric array. | |
expected_size | the expected size of an array. |
Definition at line 305 of file num_util.cpp.
References size().
Referenced by from_python_sequence::convertible().
Throws an exception if the total size computed from a vector of integer does not match with the expected size.
dims | an integer vector of dimensions. | |
n | an expected size. |
Definition at line 492 of file num_util.cpp.
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.
arr | a Boost/Python numeric array. | |
expected_type | an expected numpy type. |
Definition at line 257 of file num_util.cpp.
References kindstrings(), and type().
boost::python::numeric::array num_util::clone | ( | boost::python::numeric::array | arr | ) |
Returns a clone of this array.
arr | a Boost/Python numeric array. |
numeric::array num_util::clone | ( | numeric::array | arr | ) |
void copy_data | ( | boost::python::numeric::array | arr, | |
char * | new_data | |||
) |
Copies data into the array.
arr | a Boost/Python numeric array. | |
new_data | a char pointer referencing the new data. |
Definition at line 402 of file num_util.cpp.
References data().
void* num_util::data | ( | boost::python::numeric::array | arr | ) |
Returns a pointer to the data in the array.
arr | a Boost/Python numeric array. |
Referenced by FitsNTuple::addColumn(), copy_direct(), NTupleXML::createChildren2D(), RootNTuple::doubleArrayAt(), FitsNTuple::doubleArrayAt(), RootNTuple::fillDataCache(), FitsNTuple::fillDataCache(), FitsNTuple::fillRange(), RootNTuple::floatArrayAt(), StHist2DProjector::getAverage(), MapMatrixProjector::getAverage(), Map1Projector::getAverage(), FitsNTuple::getColumn(), RootNTuple::getType(), RootNTuple::intArrayAt(), NTuple::sum(), RootNTuple::uintArrayAt(), FitsNTuple::valueAt(), RootNTuple::valueAtNoCache(), and PyFitsController::writeToFile().
void* num_util::data | ( | numeric::array | arr | ) |
intp get_dim | ( | boost::python::numeric::array | arr, | |
int | dimnum | |||
) |
Returns the size of a specific dimension.
arr | a Boost/Python numeric array. | |
dimnum | an integer that identifies the dimension to retrieve. |
Definition at line 335 of file num_util.cpp.
References rank(), and shape().
Referenced by NumArrayTuple::addColumn(), and NumArrayTuple::rows().
PyArray_TYPES num_util::getEnum | ( | ) | [inline] |
Function template returns PyArray_Type for C++ type See num_util.cpp for specializations.
T | C++ type |
PyArray_TYPES num_util::getEnum< double > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< float > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< int > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< long > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< short > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< signed char > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< std::complex< double > > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< std::complex< float > > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< unsigned char > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< unsigned int > | ( | void | ) | [inline] |
PyArray_TYPES num_util::getEnum< unsigned short > | ( | void | ) | [inline] |
bool num_util::iscontiguous | ( | boost::python::numeric::array | arr | ) |
Returns true if the array is contiguous.
arr | a Boost/Python numeric array. |
bool num_util::iscontiguous | ( | numeric::array | arr | ) |
static KindCharMap num_util::kindchars | ( | kindCharMapEntries | , | |
kindCharMapEntries+ | numCharEntries | |||
) | [static] |
Referenced by type2char().
static KindStringMap num_util::kindstrings | ( | kindStringMapEntries | , | |
kindStringMapEntries+ | numStringEntries | |||
) | [static] |
Referenced by check_type(), and type2string().
static KindTypeMap num_util::kindtypes | ( | kindTypeMapEntries | , | |
kindTypeMapEntries+ | numTypeEntries | |||
) | [static] |
Referenced by char2type().
boost::python::numeric::array num_util::makeNum | ( | const boost::python::numeric::array & | arr | ) |
Creates a numpy array from a numpy array, referencing the data.
arr | a Boost/Python numeric array. |
boost::python::numeric::array num_util::makeNum | ( | T * | data, | |
std::vector< int > | dims | |||
) | [inline] |
Function template creates an n-dimensional numpy array with dimensions dimens containing a copy of values starting at data.
See num_util.cpp::getEnum<T>() for list of specializations
T | C type of data | |
T* | data pointer to start of data | |
n | an integer indicates the size of the array. |
Definition at line 127 of file num_util.h.
References hippodraw::Axes::T.
boost::python::numeric::array num_util::makeNum | ( | T * | data, | |
int | n = 0 | |||
) | [inline] |
Function template creates a one-dimensional numpy array of length n containing a copy of data at data*.
See num_util.cpp::getEnum<T>() for list of specializations
T | C type of data | |
T* | data pointer to start of data | |
n | an integer indicates the size of the array. |
Definition at line 103 of file num_util.h.
References hippodraw::Axes::T.
boost::python::numeric::array num_util::makeNum | ( | boost::python::object | x | ) |
A free function that extracts a PyArrayObject from any sequential PyObject.
x | a sequential PyObject wrapped in a Boost/Python 'object'. |
numeric::array num_util::makeNum | ( | const numeric::array & | arr | ) |
Definition at line 243 of file num_util.cpp.
boost::python::numeric::array makeNum | ( | std::vector< int > | dimens, | |
PyArray_TYPES | t | |||
) |
Creates a n-dimensional numpy array with dimensions dimens and numpy type t.
The elements of the array are initialized to zero.
dimens | a vector of interger specifies the dimensions of the array. | |
t | elements' numpy type. Default is double. |
Definition at line 237 of file num_util.cpp.
boost::python::numeric::array makeNum | ( | intp | n, | |
PyArray_TYPES | t | |||
) |
Creates an one-dimensional numpy array of length n and numpy type t.
The elements of the array are initialized to zero.
n | an integer representing the length of the array. | |
t | elements' numpy type. Default is double. |
Definition at line 231 of file num_util.cpp.
numeric::array num_util::makeNum | ( | object | x | ) |
Definition at line 219 of file num_util.cpp.
References check_PyArrayElementType().
Referenced by clone(), PyDataSource::columnAsNumArray(), QtRootNTuple::getColumnAsArray(), and QtRootNTuple::valueAt().
boost::python::numeric::array makeNum< double > | ( | double * | data, | |
std::vector< int > | dims | |||
) | [inline] |
int num_util::rank | ( | boost::python::numeric::array | arr | ) |
A free function that retrieves the number of dimensions of a numpy array.
arr | a Boost/Python numeric array. |
Referenced by FitsController::calcColumnWidth(), PyDataSource::checkRank(), DataColumn::doubleArrayAt(), extractVector(), RootNTuple::fillShape(), QtRootNTuple::getColumnAsArray(), RTuple::operator[](), NTuple::operator[](), DataColumn::size(), QtRootNTuple::sliceRowDimension(), and FitsFile::writeHDU().
int num_util::rank | ( | numeric::array | arr | ) |
Definition at line 271 of file num_util.cpp.
Referenced by check_rank(), PyDataSource::checkRank(), extractVector(), get_dim(), shape(), and strides().
int num_util::refcount | ( | boost::python::numeric::array | arr | ) |
int num_util::refcount | ( | numeric::array | arr | ) |
Definition at line 445 of file num_util.cpp.
std::vector<intptr_t> num_util::shape | ( | boost::python::numeric::array | arr | ) |
Returns the dimensions in a vector.
arr | a Boost/Python numeric array. |
Referenced by FitsNTuple::addColumn(), FitsController::calcColumnWidth(), PyDataSource::columnAsNumArray(), ContourFunctionRep::ContourFunctionRep(), ContourPointRep::createContours(), ContourPointRep::drawProjectedValues(), FitsNTuple::fillDataCache(), Bins2DProfile::fillDataSource(), Bins2DHist::fillDataSource(), RootController::fillDimSize(), MapMatrixProjector::fillProjectedValues(), QtRootNTuple::getColumnAsArray(), QtRootNTuple::getColumnShape(), ProjectorBase::getZValues(), NTupleController::readAsciiNTuple(), FitsNTuple::replaceColumn(), PyDataSource::saveColumnFromNumArray(), QtRootNTuple::valueAt(), FitsFile::writeHDU(), and FitsController::writeNTupleToFile().
std::vector<intptr_t> num_util::shape | ( | numeric::array | arr | ) |
Definition at line 317 of file num_util.cpp.
References rank().
Referenced by check_dim(), check_shape(), NumArrayTuple::fillShape(), get_dim(), and PyDataSource::saveColumnFromNumArray().
intp num_util::size | ( | boost::python::numeric::array | arr | ) |
A free function that returns the total size of the array.
arr | a Boost/Python numeric array. |
Referenced by NTupleProjector::acceptRow(), NTuple::addColumn(), CutController::addCut(), CutController::addCuts(), NTuple::addRow(), QtCut::addTargets(), CompositeFunctionRep::addToComposite(), EqualEntriesHist1DProjector::adjustNumberOfBins(), AxisModelBase::adjustTicks(), DataSource::append(), QtDisplay::applyCuts(), PyDataRep::applyCuts(), Inspector::availPlotTypesActivated(), MinuitMigrad::calcCovariance(), XyPlotter::checkAutoScale(), MinuitMigrad::checkIndex(), Inspector::clear(), CanvasView::contentsMouseMoveEvent(), RTuple::copy(), NTuple::copy(), copy_direct(), RootNTuple::createBinding(), AxisModelXML::createChildren(), NTupleXML::createChildren2D(), DisplayController::createDifferenceDisplay(), NTupleProjectorXML::createElement(), FunctionProjectorXML::createElement(), BinToColorXML::createElement(), NTupleProjector::createEmptyNTuple(), NTupleController::createNTuple(), MeshProjector::createNTuple(), Map2Projector::createNTuple(), FunctionController::createNTuple(), FitsController::createNTuple(), Bins2DProfile::createNTuple(), Bins2DHist::createNTuple(), Bins1DProfile::createNTuple(), Bins1DHist::createNTuple(), DisplayController::createNTupleDiff(), NTupleController::createNTupleToFile(), PointRepXML::createObject(), CompositePlotter::createPickTuple(), Inspector::cutAddAll(), NTupleProjector::dataRangeWithError(), Inspector::deleteColorModel(), EpsView::draw_Text(), DrawBorder::drawKnob(), QtViewImp::drawMethod(), QtViewImp::drawPolygon(), CompositePlotter::drawProjValues(), QtViewImp::drawViewMethod(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawXTickLines(), AxisRepBase::drawYTickLabels(), AxisRepBase::drawYTickLines(), AxisRepColor::drawZTickLabels(), AxisRepColor::drawZTickLines(), FunctionController::ellipse(), ProfileProjector::execute(), Profile2DProjector::execute(), DyHist2DProjector::execute(), DyHist1DProjector::execute(), RootNTuple::expandIfNeeded(), extractVector(), CutController::fillAcceptedRows(), CompositePlotter::fillCutList(), RootNTuple::fillDataCache(), StatedFCN::fillFreeDerivatives(), StatedFCN::fillFreeParameters(), Inspector::fillFunctionParameters(), QtXmlElement::fillNodeList(), NTupleProjector::fillNTuple(), StripChartProjector::fillProjectedValues(), MeshProjector::fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), Map1Projector::fillProjectedValues(), EqualEntriesHist1DProjector::fillProjectedValues(), DataSource::fillRange(), RootNTuple::fillShape(), FunctionController::fillTopLevelFunctionReps(), Inspector::findCutIndex(), XyPlotter::getAspectRatio(), NTupleProjector::getAverage(), MapMatrixProjector::getAverage(), Map1Projector::getAverage(), DyHist1DProjector::getAverage(), Inspector::getAxes(), NTupleProjector::getAxisBindings(), NTuple::getColumn(), DataSource::getColumn(), QtRootNTuple::getColumnAsArray(), DataSourceController::getDataSources(), RootController::getNTupleNames(), NumArrayTuple::getNumArray(), StatedFCN::getNumberFreeParms(), NTupleProjector::getNumberOfEntries(), NTupleXML::getObject(), Fitter::getParameterIndex(), NTupleProjector::getPos(), NTupleProjector::getPosWithError(), RootNTuple::getRow(), NumArrayTuple::getRow(), ListTuple::getRow(), CanvasView::getSelectedPlotters(), getSize(), CompositePlotter::getTarget(), DisplayController::getValueTransformIndex(), MeshProjector::getZValue(), MapMatrixProjector::getZValue(), Map3Projector::getZValue(), CompositePlotter::indexOf(), DataSourceController::indexOfDataSource(), DataSource::indexOfMaxElement(), DataSource::indexOfMinElement(), Inspector::init(), MinuitMigrad::initialize(), FigureEditor::initPrinter(), NTupleProjector::inRange(), CanvasView::invalidImageFormatError(), ListTuple::isAcceptable(), DataSource::isValidColumn(), Inspector::loadAllUserModels(), WindowController::moveInspector(), WindowController::newWindow(), NTuple::NTuple(), Inspector::ntupleChanged(), NTuplePearsonFCN::objectiveValue(), WindowController::openAssistant(), RTuple::operator[](), NTuple::operator[](), PickTable::PickTable(), WindowController::positionInspector(), XyPlotter::prepareToDraw(), QtDisplay::QtDisplay(), NTupleController::readAsciiNTuple(), PickTable::refreshItems(), FunctionController::removeFunction(), RootNTuple::replaceColumn(), NumArrayTuple::replaceColumn(), NTuple::replaceColumn(), ListTuple::replaceColumn(), CanvasWindow::resetFontSize(), WindowController::resizeCanvas(), NumArrayTuple::rows(), NTuple::rows(), ListTuple::rows(), RTuple::RTuple(), PyCanvas::saveAs(), CanvasView::saveAs(), NTupleController::saveNTuples(), FunctionProjectorXML::setAttributes(), FontXML::setAttributes(), CutPlotter::setAxisBinding(), NTupleProjector::setAxisBindings(), DataRepController::setAxisBindings(), Bins1DHist::setBinContents(), CutPlotter::setCuts(), NTupleFCN::setDataSource(), CompositeFunctionRep::setFixedFlags(), StatedFCN::setFreeParameters(), StatedFCN::setFunction(), MapMatrixProjector::setNTuple(), FunctionProjector::setPrincipleErrors(), PlotterBase::setTicks(), PlotterBase::setTicksOnX(), AxisRepBase::setYFontSize(), DataSource::sum(), Inspector::symbolPointSize_returnPressed(), DataSource::throwIfInvalidRowSize(), Inspector::titleText_returnPressed(), CanvasView::toLower(), PeriodicBinaryTransform::transform(), QtViewImp::transformAndFill(), DataSourceController::unregisterNTuple(), Inspector::updateColorMapCtrls(), Inspector::updateCutControls(), Inspector::updatePlotTypes(), Inspector::updateSelectedPlotDataSource(), Inspector::updateTupleCuts(), Inspector::updateValueCombo(), NumArrayTuple::valueAt(), ListTuple::valueAt(), FitsFile::writeHDU(), and FitsController::writeNTupleToFile().
intp num_util::size | ( | numeric::array | arr | ) |
Definition at line 296 of file num_util.cpp.
Referenced by check_size(), copy_direct(), extractVector(), NumArrayTuple::replaceColumn(), and NumArrayTuple::valueAt().
std::vector<intp> num_util::strides | ( | boost::python::numeric::array | arr | ) |
Returns the strides array in a vector of integer.
arr | a Boost/Python numeric array. |
std::vector<intp> num_util::strides | ( | numeric::array | arr | ) |
PyArray_TYPES num_util::type | ( | boost::python::numeric::array | arr | ) |
A free function that retrieves the numpy type of a numpy array.
arr | a Boost/Python numeric array. |
Referenced by DisplayController::addLineRep(), FitsController::checkForImage(), hippodraw::Axes::convert(), DataRepXML::createDataRep(), TransformXML::createElement(), BinsBaseXML::createElement(), PlotterBaseXML::createFontElements(), TransformXML::createObject(), PointRepXML::createObject(), DataRepXML::createObject(), BinToColorXML::createObject(), BinsBaseXML::createObject(), BinnerAxisXML::createObject(), PlotterBaseXML::createPlotter(), CanvasWindow::customEvent(), QtView::draw(), extractVector(), FitsFile::fillColumnNames(), FitsFile::fillColumnNamesFromImage(), FitsFile::fillDoubleVectorFromColumn(), QwtPaintBuffer::flush(), PlotterBase::getBinWidth(), QtRootNTuple::getColumnAsArray(), FitsFileBase::getImageType(), DataRep::getMean(), PlotterBase::getOffset(), QtDisplay::getRange(), DataRep::getRMS(), PlotTable::initialize(), PickTable::PickTable(), RootBranch::RootBranch(), BinnerAxisXML::setAttributes(), QtDisplay::setAutoRanging(), PlotterBase::setAutoTicks(), PyDataRep::setBinWidth(), QtCut::setCutRange(), PlotterBase::setLabel(), QtDisplay::setLog(), DisplayController::setLog(), QtDisplay::setOffset(), PlotterBase::setRange(), PlotterBase::setTicks(), and QtRootNTuple::valueAt().
PyArray_TYPES num_util::type | ( | numeric::array | arr | ) |
Definition at line 249 of file num_util.cpp.
References char2type().
Referenced by check_type(), and extractVector().
char type2char | ( | PyArray_TYPES | t_type | ) |
Converts a PyArray_TYPE to its single character typecode.
t_type | a PyArray_TYPES. |
Definition at line 471 of file num_util.cpp.
References kindchars().
Referenced by astype().
std::string type2string | ( | PyArray_TYPES | t_type | ) |
Converts a PyArray_TYPE to its name in string.
t_type | a PyArray_TYPES. |
Definition at line 467 of file num_util.cpp.
References kindstrings().
Referenced by extractVector().
std::string vector_str | ( | const std::vector< T > & | vec | ) | [inline] |
Constructs a string which contains a list of elements extracted from the input vector.
vec | a vector of any type. |
Definition at line 480 of file num_util.cpp.
Referenced by check_shape().
Initial value:
{ KindCharMapEntry(PyArray_UBYTE, 'B'), KindCharMapEntry(PyArray_SBYTE, 'b'), KindCharMapEntry(PyArray_SHORT, 'h'), 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 164 of file num_util.cpp.
Initial value:
{ 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_NTYPES, "PyArray_NTYPES"), KindStringMapEntry(PyArray_NOTYPE ,"PyArray_NOTYPE") }
Definition at line 143 of file num_util.cpp.
Initial value:
{ KindTypeMapEntry('B',PyArray_UBYTE), KindTypeMapEntry('b',PyArray_SBYTE), KindTypeMapEntry('h',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 183 of file num_util.cpp.
int numCharEntries = sizeof(kindCharMapEntries)/sizeof(KindCharMapEntry) |
Definition at line 203 of file num_util.cpp.
int numStringEntries = sizeof(kindStringMapEntries)/sizeof(KindStringMapEntry) |
Definition at line 202 of file num_util.cpp.
int numTypeEntries = sizeof(kindTypeMapEntries)/sizeof(KindTypeMapEntry) |
Definition at line 204 of file num_util.cpp.