-
Notifications
You must be signed in to change notification settings - Fork 67
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
Deprecation warning on np.float #50
Comments
Also appears to impact the method ax.density_contourf() Error output below. mplstereonet version 0.6.2. numpy version 1.25.2. AttributeError Traceback (most recent call last) File c:\Users\Irene\miniconda3\envs\sandpit\lib\site-packages\mplstereonet\stereonet_axes.py:815, in StereonetAxes.density_contourf(self, *args, **kwargs) File c:\Users\Irene\miniconda3\envs\sandpit\lib\site-packages\mplstereonet\stereonet_axes.py:535, in StereonetAxes._contour_helper(self, args, kwargs) File c:\Users\Irene\miniconda3\envs\sandpit\lib\site-packages\mplstereonet\contouring.py:169, in density_grid(*args, **kwargs) File c:\Users\Irene\miniconda3\envs\sandpit\lib\site-packages\mplstereonet\contouring.py:17, in _count_points(lons, lats, func, sigma, gridsize, weights) File c:\Users\Irene\miniconda3\envs\sandpit\lib\site-packages\numpy_init_.py:319, in getattr(attr) AttributeError: module 'numpy' has no attribute 'float'. |
Workaround: Specifying numpy=1.19.5 (depreciation is in 1.2). https://numpy.org/devdocs/release/1.20.0-notes.html Will pr to make the change from np.float64 to float. According to the docs, float has the same precision as float64 |
There is an error related to numpy that has removed the attribute 'float'. Probably just substituting for np.float64 suffice.
/usr/local/lib/python3.8/dist-packages/mplstereonet/stereonet_axes.py in plane(self, strike, dip, *args, **kwargs)
423 segments = kwargs.pop('segments', 100)
424 center = self._center_latitude, self._center_longitude
--> 425 lon, lat = stereonet_math.plane(strike, dip, segments, center)
426 return self.plot(lon, lat, *args, **kwargs)
427
/usr/local/lib/python3.8/dist-packages/mplstereonet/stereonet_math.py in plane(strike, dip, segments, center)
158 lon0, lat0 = center
159 strikes, dips = np.atleast_1d(strike, dip)
--> 160 lons = np.zeros((segments, strikes.size), dtype=np.float)
161 lats = lons.copy()
162 for i, (strike, dip) in enumerate(zip(strikes, dips)):
/usr/local/lib/python3.8/dist-packages/numpy/init.py in getattr(attr)
282 return Tester
283
--> 284 raise AttributeError("module {!r} has no attribute "
285 "{!r}".format(name, attr))
286
AttributeError: module 'numpy' has no attribute 'float'
thanks,
mauro
The text was updated successfully, but these errors were encountered: