12
12
except ImportError :
13
13
xw = None
14
14
15
- from larray import LArray , isnan , aslarray , Metadata
16
-
17
15
18
16
TESTDATADIR = os .path .dirname (__file__ )
19
17
@@ -38,6 +36,7 @@ def inputpath(relpath):
38
36
39
37
def assert_equal_factory (test_func ):
40
38
def assert_equal (a , b ):
39
+ from larray .core .array import LArray
41
40
if isinstance (a , LArray ) and isinstance (b , LArray ) and a .axes != b .axes :
42
41
raise AssertionError ("axes differ:\n %s\n \n vs\n \n %s" % (a .axes .info , b .axes .info ))
43
42
if not isinstance (a , (np .ndarray , LArray )):
@@ -57,6 +56,7 @@ def assert_equal(a, b):
57
56
58
57
def assert_larray_equal_factory (test_func , convert = True , check_axes = False ):
59
58
def assert_equal (a , b ):
59
+ from larray .core .array import aslarray
60
60
if convert :
61
61
a = aslarray (a )
62
62
b = aslarray (b )
@@ -88,6 +88,7 @@ def equal(a, b):
88
88
89
89
90
90
def nan_equal (a , b ):
91
+ from larray .core .ufuncs import isnan
91
92
return (a == b ) | (isnan (a ) & isnan (b ))
92
93
93
94
@@ -121,6 +122,7 @@ def tmp_path(tmpdir, fname):
121
122
122
123
@pytest .fixture
123
124
def meta ():
125
+ from larray .core .metadata import Metadata
124
126
title = 'test array'
125
127
description = 'Array used for testing'
126
128
author = 'John Cleese'
0 commit comments