Skip to content

Commit 5ac0164

Browse files
committed
Update import path to access Scalar type
1 parent 9d0ac50 commit 5ac0164

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pyarrow_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ impl FromPyArrow for PyScalarValue {
8383

8484
// Is it a NanoArrow scalar?
8585
if let Ok(na) = py.import("nanoarrow") {
86-
let type_name = value.get_type().repr()?;
87-
if type_name.contains("nanoarrow")? && type_name.contains("Scalar")? {
86+
let scalar_type = py.import("nanoarrow.array")?.getattr("Scalar")?;
87+
if value.is_instance(&scalar_type)? {
8888
return pyobj_extract_scalar_via_capsule(value, false);
8989
}
9090
let array_type = na.getattr("Array")?;

0 commit comments

Comments
 (0)