Skip to content

Commit

Permalink
Removed updates to other files
Browse files Browse the repository at this point in the history
  • Loading branch information
lukedowling44 committed Oct 12, 2024
1 parent 35d6868 commit 54158ae
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions python/pyarrow/scalar.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,15 @@ def scalar(value, type=None, *, from_pandas=None, MemoryPool memory_pool=None):
extension_type = type
type = type.storage_type

if _is_array_like(value):
value = get_values(value, &is_pandas_object)

options.size = 1

if type is not None:
ty = ensure_type(type)
options.type = ty.sp_type

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

Expand All @@ -1240,16 +1249,6 @@ def scalar(value, type=None, *, from_pandas=None, MemoryPool memory_pool=None):
result = ExtensionScalar.from_storage(extension_type, result)
return result


if _is_array_like(value):
value = get_values(value, &is_pandas_object)

options.size = 1

if type is not None:
ty = ensure_type(type)
options.type = ty.sp_type

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

0 comments on commit 54158ae

Please sign in to comment.