8000 FIX: Address numpy and traits deprecations by effigies · Pull Request #3699 · nipy/nipype · GitHub
[go: up one dir, main page]

Skip to content

FIX: Address numpy and traits deprecations #3699

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

Merged
merged 14 commits into from
Nov 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
FIX: Set legacy printoptions in doctests
  • Loading branch information
effigies committed Nov 18, 2024
commit c51abf83af17595a448f3c09705db40779e78de4
9 changes: 7 additions & 2 deletions nipype/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import shutil
from tempfile import mkdtemp
import pytest
import numpy
import numpy as np
import py.path as pp

NIPYPE_DATADIR = os.path.realpath(
Expand All @@ -15,12 +15,17 @@

@pytest.fixture(autouse=True)
def add_np(doctest_namespace):
doctest_namespace["np"] = numpy
doctest_namespace["np"] = np
doctest_namespace["os"] = os
doctest_namespace["pytest"] = pytest
doctest_namespace["datadir"] = data_dir


@pytest.fixture(scope='session', autouse=True)
def legacy_printoptions():
np.set_printoptions(legacy='1.21')


@pytest.fixture(autouse=True)
def _docdir(request):
"""Grabbed from https://stackoverflow.com/a/46991331"""
Expand Down
0