File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- from pandas .core .exchange .dataframe_protocol import Buffer , DlpackDeviceType , DtypeKind
1
+ from pandas .core .exchange .dataframe_protocol import Buffer , DlpackDeviceType
2
2
import numpy as np
3
3
from typing import Tuple
4
4
Original file line number Diff line number Diff line change 4
4
Buffer ,
5
5
ColumnNullType ,
6
6
)
7
- from pandas .core .exchange .buffer import PandasBuffer , buffer_to_ndarray
7
+ from pandas .core .exchange .buffer import PandasBuffer
8
8
from pandas .core .exchange .utils import ArrowCTypes , Endianness , dtype_to_arrow_c_fmt
9
9
from pandas .api .types import is_categorical_dtype , is_string_dtype
10
10
import pandas as pd
Original file line number Diff line number Diff line change @@ -74,9 +74,9 @@ def test_categorical(df_from_dict):
74
74
)
75
75
76
76
colX = df .__dataframe__ ().get_column_by_name ("weekday" )
77
- is_ordered , is_dictionary , _ = colX .describe_categorical
78
- assert isinstance (is_ordered , bool )
79
- assert isinstance (is_dictionary , bool )
77
+ categorical = colX .describe_categorical
78
+ assert isinstance (categorical [ " is_ordered" ] , bool )
79
+ assert isinstance (categorical [ " is_dictionary" ] , bool )
80
80
81
81
82
82
def test_dataframe (df_from_dict ):
@@ -134,7 +134,7 @@ def test_buffer(df_from_dict):
134
134
135
135
assert dataBuf .bufsize > 0
136
136
assert dataBuf .ptr != 0
137
- device , _ = dataBuf .__dlpack_device__
137
+ device , _ = dataBuf .__dlpack_device__ ()
138
138
139
139
assert dataDtype [0 ] == 0
140
140
You can’t perform that action at this time.
0 commit comments