Skip to content

Commit

Permalink
Update _funcs.py
Browse files Browse the repository at this point in the history
Co-authored-by: jakirkham <[email protected]>
  • Loading branch information
lucascolley and jakirkham authored Nov 17, 2024
1 parent b1d5edc commit 59f1428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/array_api_extra/_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,5 +429,5 @@ def sinc(x: Array, /, *, xp: ModuleType) -> Array:
err_msg = "`x` must have a real floating data type."
raise ValueError(err_msg)
# no scalars in `where` - array-api#807
y = xp.pi * xp.where(x, x, xp.asarray(xp.finfo(x.dtype).smallest_normal))
y = xp.pi * xp.where(x, x, xp.asarray(xp.finfo(x.dtype).smallest_normal, dtype=x.dtype))
return xp.sin(y) / y

0 comments on commit 59f1428

Please sign in to comment.