Skip to content

FIX: Use raw strings to fix escape characters; MNT: Avoid numpy.testing deprecation warning #705

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 1 commit into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion nibabel/affines.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def append_diag(aff, steps, starts=()):


def dot_reduce(*args):
""" Apply numpy dot product function from right to left on arrays
r""" Apply numpy dot product function from right to left on arrays

For passed arrays :math:`A, B, C, ... Z` returns :math:`A \dot B \dot C ...
\dot Z` where "." is the numpy array dot product.
Expand Down
2 changes: 1 addition & 1 deletion nibabel/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
def _parse_version(version_str):
""" Parse version string `version_str` in our format
"""
match = re.match('([0-9.]*\d)(.*)', version_str)
match = re.match(r'([0-9.]*\d)(.*)', version_str)
if match is None:
raise ValueError('Invalid version ' + version_str)
return match.groups()
Expand Down
6 changes: 5 additions & 1 deletion nibabel/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
import numpy as np
from numpy.testing import assert_array_equal

from numpy.testing.decorators import skipif
try:
from numpy.testing import dec
skipif = dec.skipif
except ImportError:
from numpy.testing.decorators import skipif
# Allow failed import of nose if not now running tests
try:
from nose.tools import (assert_equal, assert_not_equal,
Expand Down