Boost logo

Boost :

From: Philip Austin (paustin_at_[hidden])
Date: 2006-03-12 16:04:44

Neal Becker writes:
> Has anyone tried yet adding numpy support to boost::python? Is the only
> requirement to add "numpy" to load function, or are there more extensive
> API changes from numarray to numpy?

The only real problem I've encountered is handling the new type
object. e.g.:

>>> check(y.typecode());

in boost_1_33_1/libs/python/test/ will fail because
the character id returned by
y.typecode() has been replaced by a new dtype object:

In [19]:import numpy as np

In [20]:npArray=np.zeros(5)

In [21]:print npArray.typecode()
exceptions.AttributeError Traceback (most recent call last)

/nfs/kite/users/phil/<ipython console>

AttributeError: 'numpy.ndarray' object has no attribute 'typecode'

In [22]:print npArray.dtype

In [23]:print

In [24]:print npArray.dtype.num

Boost list run by bdawes at, gregod at, cpdaniel at, john at