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
In the context of NumPy's change of semantics regarding the copy argument (see #16167 for the broader discussion), it seems to me that this example will not age well and might become confusing (since the upcoming convention, dictated by numpy, is that copy arguments are already strict). We might also want to update the __astropy_table__ protocol definition so that the meaning of the copy argument aligns with the rest of the code base (i.e., follows numpy at runtime).
In short, I see two documentation changes to be made:
clarify that the copy argument should follow numpy's semantic at runtime (and demonstrate how)
use a different example for an additional keyword argument
I feel this needs to be addressed in astropy 6.1.0, though I think (?) it could be done past the feature freeze (scheduled for this Friday). Just in case though, let me ping a couple stake holders here: @astrofrog@saimn@mhvk@taldcroft
To be clear, I can absolutely deal with this before Friday, I'd like to know whether that's required or even desired. Thanks !
I agree that we should change the example. I would perhaps discuss the meaning of copy less, just state that it should follow the convention of Table itself. As a different example of a possibly useful keyword, maybe mask_invalid, which would call Masked(col, mask=np.isnan(col))?
Activity
mhvk commentedon Mar 26, 2024
I agree that we should change the example. I would perhaps discuss the meaning of copy less, just state that it should follow the convention of
Tableitself. As a different example of a possibly useful keyword, maybemask_invalid, which would callMasked(col, mask=np.isnan(col))?taldcroft commentedon Mar 26, 2024
Good catch @neutrinoceros, I definitely agree with changing that example as @mhvk suggested. The
mask_invalididea seems nice.neutrinoceros commentedon Mar 26, 2024
Ok, I'll address this now then. Thank you both for your prompt replies !