File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 1
- import numpy as np
2
1
import pytest
3
2
4
- import pandas as pd
5
3
import pandas ._testing as tm
6
4
from pandas .core .indexes .api import Index , MultiIndex
7
5
28
26
def indices (request ):
29
27
# copy to avoid mutation, e.g. setting .name
30
28
return indices_dict [request .param ].copy ()
31
-
32
-
33
- @pytest .fixture (params = [1 , np .array (1 , dtype = np .int64 )])
34
- def one (request ):
35
- # zero-dim integer array behaves like an integer
36
- return request .param
37
-
38
-
39
- zeros = [
40
- box ([0 ] * 5 , dtype = dtype )
41
- for box in [pd .Index , np .array ]
42
- for dtype in [np .int64 , np .uint64 , np .float64 ]
43
- ]
44
- zeros .extend ([np .array (0 , dtype = dtype ) for dtype in [np .int64 , np .uint64 , np .float64 ]])
45
- zeros .extend ([0 , 0.0 ])
46
-
47
-
48
- @pytest .fixture (params = zeros )
49
- def zero (request ):
50
- # For testing division by (or of) zero for Index with length 5, this
51
- # gives several scalar-zeros and length-5 vector-zeros
52
- return request .param
You can’t perform that action at this time.
0 commit comments