@@ -48,9 +48,7 @@ class TestExpressions:
48
48
def setup_method (self , method ):
49
49
50
50
self .frame = _frame .copy ()
51
- self .array = _array .copy ()
52
51
self .frame2 = _frame2 .copy ()
53
- self .array2 = _array2 .copy ()
54
52
self .mixed = _mixed .copy ()
55
53
self .mixed2 = _mixed2 .copy ()
56
54
self ._MIN_ELEMENTS = expr ._MIN_ELEMENTS
@@ -138,23 +136,19 @@ def test_arithmetic(self, df, flex):
138
136
self .run_frame (df , df , flex )
139
137
140
138
def test_invalid (self ):
139
+ array = np .random .randn (1_000_001 )
140
+ array2 = np .random .randn (100 )
141
141
142
142
# no op
143
- result = expr ._can_use_numexpr (
144
- operator .add , None , self .array , self .array , "evaluate"
145
- )
143
+ result = expr ._can_use_numexpr (operator .add , None , array , array , "evaluate" )
146
144
assert not result
147
145
148
146
# min elements
149
- result = expr ._can_use_numexpr (
150
- operator .add , "+" , self .array2 , self .array2 , "evaluate"
151
- )
147
+ result = expr ._can_use_numexpr (operator .add , "+" , array2 , array2 , "evaluate" )
152
148
assert not result
153
149
154
150
# ok, we only check on first part of expression
155
- result = expr ._can_use_numexpr (
156
- operator .add , "+" , self .array , self .array2 , "evaluate"
157
- )
151
+ result = expr ._can_use_numexpr (operator .add , "+" , array , array2 , "evaluate" )
158
152
assert result
159
153
160
154
@pytest .mark .parametrize (
0 commit comments