File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1642,8 +1642,11 @@ def kind(self) -> str:
16421642 @cache_readonly
16431643 def itemsize (self ) -> int :
16441644 """Return the number of bytes in this dtype"""
1645+ if hasattr (self .pyarrow_dtype , "bit_width" ):
1646+ return self .pyarrow_dtype .bit_width // 8
16451647 return self .numpy_dtype .itemsize
16461648
1649+
16471650 def construct_array_type (self ) -> type_t [BaseMaskedArray ]:
16481651 """
16491652 Return the array type associated with this dtype.
@@ -2307,8 +2310,11 @@ def kind(self) -> str:
23072310 @cache_readonly
23082311 def itemsize (self ) -> int :
23092312 """Return the number of bytes in this dtype"""
2313+ if hasattr (self .pyarrow_dtype , "bit_width" ):
2314+ return self .pyarrow_dtype .bit_width // 8
23102315 return self .numpy_dtype .itemsize
23112316
2317+
23122318 def construct_array_type (self ) -> type_t [ArrowExtensionArray ]:
23132319 """
23142320 Return the array type associated with this dtype.
You can’t perform that action at this time.
0 commit comments