On Monday 03 November 2008, Andreas Klöckner wrote:
> On Montag 03 November 2008, Neal Becker wrote:
> > OK, but that's not a 1d slice, it's 2d:
> > v
> > Out:
> > array([[ 0, 1, 2, 3],
> > [ 4, 5, 6, 7],
> > [ 8, 9, 10, 11],
> > [12, 13, 14, 15]])
> > v[:,:2]
> > Out:
> > array([[ 0, 1],
> > [ 4, 5],
> > [ 8, 9],
> > [12, 13]])
> Sure it's a 2D slice. numpy_vector in ublas is designed to accept any
> dimensionality. If we only have strided, these things can't be passed into
> PyUblas. Bad.
I was not aware that numpy_vector, which is 1-dimensional, was intended to
accept higher-D numpy arrays. What does it mean to map a higher-D numpy array
to a 1-D numpy_vector? Do we really want this?
The custom iterators that were added to numpy_vector will only work for dense
contiguous arrays of stride=1.
I had thought that numpy_vector only accepts 1-d numpy array. In that case,
we don't need a distinction between numpy_strided_vector and numpy_vector.
Both are only dense contiguous arrays with numpy_vector having stride=1 and
numpy_strided_vector having any stride.
Really enjoying pyublas!
In ipython, when I view the docstring, the python prototype shows as:
__init__( (object)arg1, (object)x, (object)y, (int)a, (float)b) -> None :
After I 'import pyublas', it becomes:
__init__( (object)arg1, (numpy.ndarray)x, (numpy.ndarray)y,
(object)a, (object)b) -> None :
Is there any way to keep the type information for every argument? ie,
__init__( (object)arg1, (numpy.ndarray)x, (numpy.ndarray)y, (int)a,
(float)b) -> None :