tile() can't handle empty arrays

June 10, 2007
3:16 p.m.
in octave repmat([],2,3) works well: ans = [](0x0) I guess in MATLAB too but numpy tile() can't handle it correctly:
from numpy import * tile(array([1]), (2,3)) array([[1, 1, 1], [1, 1, 1]]) tile(array([]), (2,3)) Traceback (innermost last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/site-packages/numpy/lib/shape_base.py", line 623, in tile c = c.reshape(-1,n).repeat(nrep,0) ValueError: total size of new array must be unchanged
(I have numpy 1.0.1) D.
6494
Age (days ago)
6494
Last active (days ago)
0 comments
1 participants
participants (1)
-
dmitrey