| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Branch must be rebased, because code has been moved to src\array_api_extra\_agnostic\_statistical.py
Sorry, something went wrong.
applying changes for mean Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
There was a problem hiding this comment.
LGTM. Thank you @ushnah
Sorry, something went wrong.
|
CC: @lucascolley I think this looks fine to merge |
Sorry, something went wrong.
There was a problem hiding this comment.
thanks all! One question
Sorry, something went wrong.
| safe_count = xp.astype( | ||
| xp.where(count == 0, xp.ones_like(count), count), | ||
| sum_.dtype, | ||
| copy=False, | ||
| ) | ||
| result = sum_ / safe_count | ||
| if xp.any(count == 0): | ||
| result = xp.where( | ||
| count == 0, | ||
| xp.full_like(result, xp.nan), | ||
| result, | ||
| ) |
There was a problem hiding this comment.
why is one of these xp.where calls gated behind xp.any(count == 0), but the other isn't?
Sorry, something went wrong.
There was a problem hiding this comment.
Valid point! Maybe we can just remove this extra condition, the where clause is checking for 0s anyways
Sorry, something went wrong.
|
In case you are interested in contributing another PR @ushnah, checking off the last item in gh-100 would be a good contribution. That would involve following the instructions at https://data-apis.org/array-api-extra/contributing.html#delegation for |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Towards #789