From: Dustin M. <dus...@gm...> - 2016-02-26 20:55:01
|
Hi all, When I try to project a subvolume I get the following error: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-9-c7d5e1885a02> in <module>() ----> 1 sv2d = project(sv, r) /opt/pytom/basic/transformations.py in project(v, rot, verbose) 611 npprojection = ndarray([v.sizeX(), v.sizeY(), 1], dtype=float32, buffer=None, offset=0, strides=npvol.strides, 612 order='F') --> 613 proj(npvol, axis=2, dtype=float32, out=npprojection) 614 projection = npy2vol(npprojection,3) 615 return projection /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.pyc in sum(a, axis, dtype, out, keepdims) 1712 else: 1713 return _methods._sum(a, axis=axis, dtype=dtype, -> 1714 out=out, keepdims=keepdims) 1715 1716 def product (a, axis=None, dtype=None, out=None, keepdims=False): /usr/lib/python2.7/dist-packages/numpy/core/_methods.pyc in _sum(a, axis, dtype, out, keepdims) 23 def _sum(a, axis=None, dtype=None, out=None, keepdims=False): 24 return um.add.reduce(a, axis=axis, dtype=dtype, ---> 25 out=out, keepdims=keepdims) 26 27 def _prod(a, axis=None, dtype=None, out=None, keepdims=False): ValueError: output parameter for reduction operation add has too many dimensions If I add ‘keepdims=True’ to the sum call I get a projection, but is this OK to do? — Cheers, Dustin |