skulpt_numpy icon indicating copy to clipboard operation
skulpt_numpy copied to clipboard

Verifiy slicing with tuples

Open ebertmi opened this issue 9 years ago • 0 comments

See if slices with tuples are working.

import numpy as np

a = np.arange(3*4*5*6).reshape((3,4,5,6))
b = np.arange(3*4*5*6)[::-1].reshape((5,4,6,3))
c = np.dot(a, b)
print(c.shape)
c = c[2,3,2,1,2,2]
print(c) # 499128

Does not return the correct result.

ToDo:

  • [ ] analyse why this is not working. Is it related to numpy.dot
  • [ ] current implementation does only work for tuples when they contain indices for all dimensions (in real numpy you can also omit a few)
  • [ ] look into __getslice__

ebertmi avatar Oct 05 '15 13:10 ebertmi