Skip to content

Commit c732dff

Browse files
kesmit13claude
andcommitted
Guard np.dtype check in normalize_dtype for environments without numpy
When numpy is not available (e.g., WASM), the `np` name is undefined. The has_numpy flag was already used elsewhere but this check was missed when the numpy_stub was removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1b90ab6 commit c732dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

singlestoredb/functions/signature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def normalize_dtype(dtype: Any) -> str:
332332
if isinstance(dtype, str):
333333
return sql_to_dtype(dtype)
334334

335-
if typing.get_origin(dtype) is np.dtype:
335+
if has_numpy and typing.get_origin(dtype) is np.dtype:
336336
dtype = typing.get_args(dtype)[0]
337337

338338
# Specific types

0 commit comments

Comments
 (0)