@@ -1034,17 +1034,17 @@ def test_describe_none(self):
1034
1034
expected = Series ([0 , 0 ], index = ['count' , 'unique' ], name = 'None' )
1035
1035
assert_series_equal (noneSeries .describe (), expected )
1036
1036
1037
- def test_to_xray (self ):
1037
+ def test_to_xarray (self ):
1038
1038
1039
- tm ._skip_if_no_xray ()
1039
+ tm ._skip_if_no_xarray ()
1040
1040
import xray
1041
1041
from xray import DataArray
1042
1042
1043
1043
if LooseVersion (xray .__version__ ) > '0.6.1' :
1044
1044
# https://github.com/xray/xray/issues/697
1045
1045
s = Series ([])
1046
1046
s .index .name = 'foo'
1047
- result = s .to_xray ()
1047
+ result = s .to_xarray ()
1048
1048
self .assertEqual (len (result ), 0 )
1049
1049
self .assertEqual (len (result .coords ), 1 )
1050
1050
self .assertEqual (result .coords .keys (), ['foo' ])
@@ -1056,7 +1056,7 @@ def test_to_xray(self):
1056
1056
tm .makeTimedeltaIndex ]:
1057
1057
s = Series (range (6 ), index = index (6 ))
1058
1058
s .index .name = 'foo'
1059
- result = s .to_xray ()
1059
+ result = s .to_xarray ()
1060
1060
repr (result )
1061
1061
self .assertEqual (len (result ), 6 )
1062
1062
self .assertEqual (len (result .coords ), 1 )
@@ -1072,12 +1072,12 @@ def test_to_xray(self):
1072
1072
s = Series (range (6 ), index = index (6 ))
1073
1073
s .index .name = 'foo'
1074
1074
1075
- result = s .to_xray ()
1075
+ result = s .to_xarray ()
1076
1076
self .assertRaises (ValueError , lambda : repr (result ))
1077
1077
1078
1078
s .index = pd .MultiIndex .from_product ([['a' , 'b' ], range (3 )],
1079
1079
names = ['one' , 'two' ])
1080
- result = s .to_xray ()
1080
+ result = s .to_xarray ()
1081
1081
self .assertEqual (len (result ), 2 )
1082
1082
assert_almost_equal (result .coords .keys (), ['one' , 'two' ])
1083
1083
self .assertIsInstance (result , DataArray )
@@ -1766,9 +1766,9 @@ def test_pct_change(self):
1766
1766
1767
1767
self .assert_frame_equal (result , expected )
1768
1768
1769
- def test_to_xray (self ):
1769
+ def test_to_xarray (self ):
1770
1770
1771
- tm ._skip_if_no_xray ()
1771
+ tm ._skip_if_no_xarray ()
1772
1772
import xray
1773
1773
from xray import Dataset
1774
1774
@@ -1785,9 +1785,9 @@ def test_to_xray(self):
1785
1785
)
1786
1786
1787
1787
if LooseVersion (xray .__version__ ) > '0.6.1' :
1788
- # https://github.com/xray/xray /issues/697
1788
+ # https://github.com/pydata/xarray /issues/697
1789
1789
df .index .name = 'foo'
1790
- result = df [0 :0 ].to_xray ()
1790
+ result = df [0 :0 ].to_xarray ()
1791
1791
self .assertEqual (result .dims ['foo' ], 0 )
1792
1792
self .assertIsInstance (result , Dataset )
1793
1793
@@ -1798,7 +1798,7 @@ def test_to_xray(self):
1798
1798
df .index = index (3 )
1799
1799
df .index .name = 'foo'
1800
1800
df .columns .name = 'bar'
1801
- result = df .to_xray ()
1801
+ result = df .to_xarray ()
1802
1802
self .assertEqual (result .dims ['foo' ], 3 )
1803
1803
self .assertEqual (len (result .coords ), 1 )
1804
1804
self .assertEqual (len (result .data_vars ), 8 )
@@ -1820,26 +1820,26 @@ def test_to_xray(self):
1820
1820
# not implemented
1821
1821
df .index = pd .MultiIndex .from_product ([['a' ], range (3 )],
1822
1822
names = ['one' , 'two' ])
1823
- self .assertRaises (ValueError , lambda : df .to_xray ())
1823
+ self .assertRaises (ValueError , lambda : df .to_xarray ())
1824
1824
1825
1825
1826
1826
class TestPanel (tm .TestCase , Generic ):
1827
1827
_typ = Panel
1828
1828
_comparator = lambda self , x , y : assert_panel_equal (x , y )
1829
1829
1830
- def test_to_xray (self ):
1830
+ def test_to_xarray (self ):
1831
1831
1832
- tm ._skip_if_no_xray ()
1832
+ tm ._skip_if_no_xarray ()
1833
1833
import xray
1834
1834
from xray import Dataset
1835
1835
1836
1836
p = tm .makePanel ()
1837
1837
1838
1838
if LooseVersion (xray .__version__ ) > '0.6.1' :
1839
- # https://github.com/xray/xray /issues/697
1839
+ # https://github.com/pydata/xarray /issues/697
1840
1840
pass
1841
1841
1842
- result = p .to_xray ()
1842
+ result = p .to_xarray ()
1843
1843
self .assertIsInstance (result , Dataset )
1844
1844
self .assertEqual (len (result .coords ), 3 )
1845
1845
assert_almost_equal (result .coords .keys (),
@@ -1851,9 +1851,9 @@ class TestPanel4D(tm.TestCase, Generic):
1851
1851
_typ = Panel4D
1852
1852
_comparator = lambda self , x , y : assert_panel4d_equal (x , y )
1853
1853
1854
- def test_to_xray (self ):
1854
+ def test_to_xarray (self ):
1855
1855
1856
- tm ._skip_if_no_xray ()
1856
+ tm ._skip_if_no_xarray ()
1857
1857
import xray
1858
1858
from xray import Dataset
1859
1859
@@ -1863,7 +1863,7 @@ def test_to_xray(self):
1863
1863
# https://github.com/xray/xray/issues/697
1864
1864
pass
1865
1865
1866
- result = p .to_xray ()
1866
+ result = p .to_xarray ()
1867
1867
self .assertIsInstance (result , Dataset )
1868
1868
self .assertEqual (len (result .coords ), 4 )
1869
1869
assert_almost_equal (result .coords .keys (),
0 commit comments