SciPy 0.6.0 API Documentation Generated by Endo, 2007-10-17
build_info holds classes that define the information needed for building C++ extension modules for Python that handle different data types. The information includes such as include files, libraries, and even code snippets.
array_info -- for building functions that use scipy arrays
blitz_dir = os.path.join(local_dir, 'blitz')
blitz_support_code = """
// This should be declared only if they are used by some function
// to keep from generating needless warnings. for now, we'll always
// declare them.
int _beg = blitz::fromStart;
int _end = blitz::toEnd;
blitz::Range _all = blitz::Range::all();
template<class T, int N>
static blitz::Array<T,N> convert_to_blitz(PyArrayObject* arr_obj,const char* name)
{
blitz::TinyVector<int,N> shape(0);
blitz::TinyVector<int,N> strides(0);
int stride_acc = 1;
//for (int i = N-1; i >=0; i--)
for (int i = 0; i < N; i++)
{
shape[i] = arr_obj->dimensions[i];
strides[i] = arr_obj->strides[i]/sizeof(T);
}
//return blitz::Array<T,N>((T*) arr_obj->data,shape,
return blitz::Array<T,N>((T*) arr_obj->data,shape,strides,
blitz::neverDeleteData);
}
template<class T, int N>
static blitz::Array<T,N> py_to_blitz(PyArrayObject* arr_obj,const char* name)
{
blitz::TinyVector<int,N> shape(0);
blitz::TinyVector<int,N> strides(0);
int stride_acc = 1;
//for (int i = N-1; i >=0; i--)
for (int i = 0; i < N; i++)
{
shape[i] = arr_obj->dimensions[i];
strides[i] = arr_obj->strides[i]/sizeof(T);
}
//return blitz::Array<T,N>((T*) arr_obj->data,shape,
return blitz::Array<T,N>((T*) arr_obj->data,shape,strides,
blitz::neverDeleteData);
}
"""
| Local name | Refers to |
|---|---|
| base_info | SciPy.weave.base_info |
| blitz_spec | SciPy.weave.blitz_spec |
| os | os |
| standard_array_spec | SciPy.weave.standard_array_spec |