forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#231679 from CedricFinance/brian2-zhf-fix
python311Packages.brian2: add patch to fix deprecated numpy types
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Description: Remove deprecated use of np.float | ||
Author: Marcel Stimberg <[email protected]> | ||
Bug-Debian: https://bugs.debian.org/1027193 | ||
Applied-Upstream: 61ef84b316a3d0a892298adf51abd8ac50900758 | ||
Last-Update: 2023-01-06 | ||
--- | ||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | ||
--- brian.orig/brian2/units/fundamentalunits.py | ||
+++ brian/brian2/units/fundamentalunits.py | ||
@@ -1597,7 +1597,7 @@ | ||
unitless = np.array(self / best_unit, copy=False) | ||
threshold = np.get_printoptions()['threshold'] // 100 | ||
if unitless.ndim == 0: | ||
- sympy_quantity = np.float(unitless) | ||
+ sympy_quantity = float(unitless) | ||
elif unitless.ndim == 1: | ||
array_str = np.array2string(unitless, separator=" & ", threshold=threshold, | ||
max_line_width=sys.maxsize) |