Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update
Browse files Browse the repository at this point in the history
goodwanghan committed Jun 28, 2024
1 parent ca3b322 commit bebcfc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/utils/test_pandas_like.py
Original file line number Diff line number Diff line change
@@ -92,14 +92,14 @@ def test_as_array_iterable():
# prevent pandas auto type casting
df = DF([[1.0, 1.1]], "a:double,b:int")
assert [[1.0, 1]] == df.as_array()
np.issubdtype(df.as_array()[0][0], np.float_)
np.issubdtype(df.as_array()[0][0], np.float64)
np.issubdtype(df.as_array()[0][1], np.integer)
assert [[1.0, 1]] == df.as_array(["a", "b"])
assert [[1, 1.0]] == df.as_array(["b", "a"])

df = DF([[np.float64(1.0), 1.1]], "a:double,b:int")
assert [[1.0, 1]] == df.as_array()
np.issubdtype(df.as_array()[0][0], np.float_)
np.issubdtype(df.as_array()[0][0], np.float64)
np.issubdtype(df.as_array()[0][1], np.integer)

df = DF([[pd.Timestamp("2020-01-01"), 1.1]], "a:datetime,b:int")
@@ -113,7 +113,7 @@ def test_as_array_iterable():

df = DF([[1.0, 1.1]], "a:double,b:int")
assert [[1.0, 1]] == df.as_array(type_safe=True)
np.issubdtype(df.as_array()[0][0], np.float_)
np.issubdtype(df.as_array()[0][0], np.float64)
np.issubdtype(df.as_array()[0][1], np.integer)


0 comments on commit bebcfc6

Please sign in to comment.