NRL-Plasma-Physics-Division / turbopy

A lightweight computational physics framework, based on the organization of turboWAVE. Implements a "Simulation, PhysicsModule, ComputeTool, Diagnostic" class hierarchy.
https://turbopy.readthedocs.io/
Creative Commons Zero v1.0 Universal
10 stars 18 forks source link

Deprecation warnings for using np.int, np.float #172

Closed littlewatkins closed 1 year ago

littlewatkins commented 3 years ago

Issue

After running the tests on the development environment of turboPy, there were a number of warnings for using np.int, np.float for specifying types. As of NumPy 1.20, those aliases are considered deprecated. int and float can be used instead. One of the warnings is shown below.

DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`.   
To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe.   
When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision.   
If you wish to review your current use, check the release note link for additional information.  
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations  
self.num_points = np.int(self.num_points)