Exemplo n.º 1
0
 def test_is_null(self):
     x = np.random.RandomState(42).randn(5, 6)
     x[x < 0] = np.nan
     original = DataArray(x, [-np.arange(5), np.arange(6)], ['x', 'y'])
     expected = DataArray(pd.isnull(x), [-np.arange(5), np.arange(6)],
                          ['x', 'y'])
     self.assertDataArrayIdentical(expected, original.isnull())
     self.assertDataArrayIdentical(~expected, original.notnull())
Exemplo n.º 2
0
 def test_is_null(self):
     x = np.random.RandomState(42).randn(5, 6)
     x[x < 0] = np.nan
     original = DataArray(x, [-np.arange(5), np.arange(6)], ['x', 'y'])
     expected = DataArray(pd.isnull(x), [-np.arange(5), np.arange(6)],
                          ['x', 'y'])
     self.assertDataArrayIdentical(expected, original.isnull())
     self.assertDataArrayIdentical(~expected, original.notnull())