Skip to content
This repository has been archived by the owner on Feb 26, 2025. It is now read-only.

Commit

Permalink
only set legacy print mode if numpy >= 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Joni Herttuainen committed Jul 8, 2024
1 parent be1b67c commit b76f410
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bluepysnap/circuit_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
L = logging.getLogger("brainbuilder")
MAX_MISSING_FILES_DISPLAY = 10

# print numpy scalars as "1" instead of "np.uint64(1)"
np.set_printoptions(legacy="1.25")
# print numpy scalars as "1" instead of "np.uint64(1)" (changed in numpy==2.0.0)
if np.version.version >= "2.0.0": # pragma: no cover
np.set_printoptions(legacy="1.25")


def _check_partial_circuit_config(config):
Expand Down

0 comments on commit b76f410

Please sign in to comment.