Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
lukedowling44 committed Oct 19, 2024
1 parent 2111365 commit 0c0c239
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions python/pyarrow/scalar.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -1236,18 +1236,11 @@ def scalar(value, type=None, *, from_pandas=None, MemoryPool memory_pool=None):
options.type = ty.sp_type

cdef shared_ptr[CArray] c_array
cdef shared_ptr[CScalar] c_scalar

if hasattr(value, "__arrow_c_array__"):
c_array = pyarrow_unwrap_array(value.__arrow_c_array__())
if c_array.get().length() != 1:
raise ValueError("Expected a length-1 array for scalar construction")
with nogil:
c_scalar = GetResultValue(c_array.get().GetScalar(0))
result = Scalar.wrap(c_scalar)
if extension_type is not None:
result = ExtensionScalar.from_storage(extension_type, result)
return result

if from_pandas is None:
options.from_pandas = is_pandas_object
Expand Down

0 comments on commit 0c0c239

Please sign in to comment.