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
21import pytest
32
4- import pandas as pd
53import pandas ._testing as tm
64from pandas .core .indexes .api import Index , MultiIndex
75
2826def indices (request ):
2927 # copy to avoid mutation, e.g. setting .name
3028 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