Beispiel #1
0
    def test_to_numpy_alias(self):
        # GH 24653: alias .to_numpy() for scalars
        td = Timedelta("10m7s")
        assert td.to_timedelta64() == td.to_numpy()

        # GH#44460
        msg = "dtype and copy arguments are ignored"
        with pytest.raises(ValueError, match=msg):
            td.to_numpy("m8[s]")
        with pytest.raises(ValueError, match=msg):
            td.to_numpy(copy=True)
Beispiel #2
0
 def test_to_numpy_alias(self):
     # GH 24653: alias .to_numpy() for scalars
     td = Timedelta('10m7s')
     assert td.to_timedelta64() == td.to_numpy()
Beispiel #3
0
 def test_to_numpy_alias(self):
     # GH 24653: alias .to_numpy() for scalars
     td = Timedelta('10m7s')
     assert td.to_timedelta64() == td.to_numpy()