Conversation
There was a problem hiding this comment.
Thanks @mdtanker for pushing this forward! I just left a few minor suggestions. Let me know what do you think!
It might be also nice to check if min_percentile <= max_percentile so we are ensure that min <= max regardless of the choices of percentile values.
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Since percentile calculations are slower than min/max, I only do them if non-default values (0,100) are provided. If only 1 non-default percentile provided, only calculate that percentile and use min/max for other value.
|
Here are some timings for future reference: import numpy as np
import verde as vd
a = np.random.uniform(size=(27, 100))
|
santisoler
left a comment
There was a problem hiding this comment.
Looking good, @mdtanker. Just left a few comments. Let me know what do you think!
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
|
By the way, I merged the recent changes from main here which should fix some of the unrelated failures. |
|
Nothing stopping it just haven't had time, can get it done tomorrow though! |
|
Ah awesome! Thanks! Don't forget to add yourself to the AUTHORS file as well. |
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
|
Ok this should be ready to go! I think I resolved all the review comments from @santisoler, but it seems the review is still blocking the merge? Is there something I should do on my end? |
|
Hi @mdtanker sorry, was having a look and had a couple more comments. |
Co-authored-by: Leonardo Uieda <leo@uieda.com>
Co-authored-by: Leonardo Uieda <leo@uieda.com>
Co-authored-by: Leonardo Uieda <leo@uieda.com>
|
Merged! Thanks for this @mdtanker! |
Adds an equivalanet function to
maxabsbut for calculating the min and max values of arrays, or optionally user-specified percentiles of the values.This is useful for
Relevant issues/PRs:
Implements the function requested in #525
Follows the percentiles approach from #524 and #523