You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking at the ramp fitting code I noticed several instances where a binary mask was created, thennumpy.where used to generate indices that were then used to set values in an array like in the following example:
While looking at the ramp fitting code I noticed several instances where a binary mask was created, then
numpy.where
used to generate indices that were then used to set values in an array like in the following example:stcal/src/stcal/ramp_fitting/utils.py
Lines 1501 to 1505 in 3321069
The binary mask can be used directly:
which will result in faster code (the modified code takes ~15% of the original code using a test case, included below, on my machine).
The text was updated successfully, but these errors were encountered: