Skip to content

IndexError: boolean index did not match indexed array along dimension 0; dimension is 10240 but corresponding boolean dimension is 10241 #88

@tsippel12345

Description

@tsippel12345

A fresh install of a conda env with tomopy and tomopy-cli result in an indexing error. Error reproduced on multiple systems, following install instructions of
tomopy: https://tomopy.readthedocs.io/en/stable/
and tomopy-cli: https://tomopycli.readthedocs.io/en/latest/source/install.html

Traceback (most recent call last):
  File "/home/tsippel/anaconda3/envs/tomopy/bin/tomopy", line 33, in <module>
    sys.exit(load_entry_point('tomopy-cli==0.3', 'console_scripts', 'tomopy')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tsippel/anaconda3/envs/tomopy/bin/tomopycli.py", line 181, in main
    args._func(args)
  File "/home/tsippel/anaconda3/envs/tomopy/bin/tomopycli.py", line 109, in run_rec
    recon.rec(args)
  File "/home/tsippel/anaconda3/envs/tomopy/lib/python3.11/site-packages/tomopy_cli/recon.py", line 92, in rec
    proj, flat, dark, theta, rotation_axis = file_io.read_tomo(sino, pproj, params) 
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tsippel/anaconda3/envs/tomopy/lib/python3.11/site-packages/tomopy_cli/file_io.py", line 68, in read_tomo
    proj, flat, dark, theta = flip_and_stitch(params, proj360, flat360, dark360, theta360)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tsippel/anaconda3/envs/tomopy/lib/python3.11/site-packages/tomopy_cli/file_io.py", line 236, in flip_and_stitch
    img[:,:,:img360.shape[2]] = img360[good_180_360,:,::-1] * wedge
                                ~~~~~~^^^^^^^^^^^^^^^^^^^^^
IndexError: boolean index did not match indexed array along dimension 0; dimension is 10240 but corresponding boolean dimension is 10241

Current environment:

# Name                    Version                   Build  Channel
dxchange                  0.1.8              pyhd8ed1ab_0    conda-forge
meta                      0.1                      pypi_0    pypi
tomopy                    1.14.0             pyhd8ed1ab_0    conda-forge
tomopy-cli                0.3                      pypi_0    pypi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions