Open jvavrek opened 4 months ago
Thank you for highlighting this! I think this is difficult with the current semantic model as it requires Ruff to understand that the type of the variable x
is a NumPy array. Related to https://github.com/astral-sh/ruff/issues/6432, if Ruff were to just check for the .ptp
method, it would raise false positives if the variable is not a Numpy array.
ruff
does not catch thearr.ptp() --> np.ptp(arr)
updates necessary innumpy>=2
MWE: