Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create an `empty` 1-D scalar array of the expected return type of the user function. Then store this `default` value into the 1-D scalar array. This has the advantage of raising a `ValueError` if the `default` value cannot be coerced into a scalar of the appropriate type and stored into this array. It also handles some situations better like having a 1-D scalar array provided as the `default` value by ensuring the result remains 1-D.
- Loading branch information