module 'ants.core.ants_image' has no attribute 'ANTsImage'See original GitHub issue
Hi, I recently install ANTsPy via
pip install https://github.com/ANTsX/ANTsPy/releases/download/v0.1.4/antspy-0.1.4-cp36-cp36m-linux_x86_64.whl
when I try to convert numpy array to ants image by
I get the following error message:
/lib/python3.6/site-packages/ants/core/ants_image_io.py in _from_numpy(data, origin, spacing, direction, has_components) 125 if not has_components: 126 itk_image = libfn(data, data.shape[::-1]) –> 127 ants_image = iio.ANTsImage(pixeltype=ptype, dimension=ndim, components=1, pointer=itk_image, 128 origin=origin, spacing=spacing, direction=direction) 129 ants_image._ndarr = data AttributeError: module ‘ants.core.ants_image’ has no attribute ‘ANTsImage’
I check the aforementioned ants_image_io.py and there is no attribute called ‘ANTsImage’. It seems to be a bug.
Does anyone know how to fix that? Thanks a lot.
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
pip install sklearn statsmodels could resolve the issue as well.