Hello,

I think there's something strange with shape when a slice is given by an array.

import numpy as N
my_array = N.ones((2, 3, 6))
ind = N.arange(4)
#you hope to find (3, 4)
print my_array[0, :, ind].shape
print my_array[0, :, 0:4].shape
print my_array[0][:, ind].shape
print my_array[0][:, 0:4].shape

"""
(4, 3)
(3, 4)
(3, 4)
(3, 4)
"""

Jean-Baptiste Rudant



      
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to