Neal Becker
2008-11-16 15:00:19 UTC
v
array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11],
[12, 13, 14, 15]])
v[:,:2]
array([[ 0, 1],
[ 4, 5],
[ 8, 9],
[12, 13]])
Sure it's a 2D slice. numpy_vector in ublas is designed to accept anyarray([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11],
[12, 13, 14, 15]])
v[:,:2]
array([[ 0, 1],
[ 4, 5],
[ 8, 9],
[12, 13]])
dimensionality. If we only have strided, these things can't be passed into
PyUblas. Bad.
Andreas
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.