Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpy 'float' attribute is depreciated and removed in current versions, throwing errors in examples #56

Open
chippey opened this issue Dec 25, 2022 · 0 comments

Comments

@chippey
Copy link

chippey commented Dec 25, 2022

When trying to run the retiling example, I got

 File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/laserfarm/main.py", line 10, in main
    fire.Fire({'data_processing': DataProcessing,
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/fire/core.py", line 475, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
                                ^^^^^^^^^^^^^^^^^^^^
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/laserfarm/retiler.py", line 38, in set_grid
    self.grid.setup(min_x, min_y, max_x, max_y, n_tiles_side)
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/laserfarm/grid.py", line 38, in setup
    self._check_finite_extent()
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/laserfarm/grid.py", line 158, in _check_finite_extent
    if np.isclose(self.grid_width[n_dim], 0.):
                  ^^^^^^^^^^^^^^^
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/laserfarm/grid.py", line 67, in grid_width
    return self.grid_maxs - self.grid_mins
           ^^^^^^^^^^^^^^
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/laserfarm/grid.py", line 62, in grid_maxs
    return np.array([self.max_x, self.max_y], dtype=np.float)
                                                    ^^^^^^^^
  File "/home/chippey/.conda/envs/laserfarm/lib/python3.11/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'. Did you mean: 'cfloat'?

Looks like in the latest version of numpy, np.float is no longer a valid datatype. Is this meant to be a 32 bit float, or bigger?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant