Skip to content

Commit cf76f6e

Browse files
committed
FIX: Escapes and NumPy import
1 parent d45417a commit cf76f6e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

nibabel/affines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def append_diag(aff, steps, starts=()):
238238

239239

240240
def dot_reduce(*args):
241-
""" Apply numpy dot product function from right to left on arrays
241+
r""" Apply numpy dot product function from right to left on arrays
242242
243243
For passed arrays :math:`A, B, C, ... Z` returns :math:`A \dot B \dot C ...
244244
\dot Z` where "." is the numpy array dot product.

nibabel/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
def _parse_version(version_str):
3333
""" Parse version string `version_str` in our format
3434
"""
35-
match = re.match('([0-9.]*\d)(.*)', version_str)
35+
match = re.match(r'([0-9.]*\d)(.*)', version_str)
3636
if match is None:
3737
raise ValueError('Invalid version ' + version_str)
3838
return match.groups()

nibabel/testing/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
import numpy as np
1919
from numpy.testing import assert_array_equal
2020

21-
from numpy.testing.decorators import skipif
21+
try:
22+
from numpy.testing import dec
23+
skipif = dec.skipif
24+
except ImportError:
25+
from numpy.testing.decorators import skipif
2226
# Allow failed import of nose if not now running tests
2327
try:
2428
from nose.tools import (assert_equal, assert_not_equal,

0 commit comments

Comments
 (0)