Open moonbooks73 opened 3 months ago
Thanks Natalia, really useful report. We will investigate this shortly and let you know what we find here.
Ah, I have now realised the reason for this behaviour difference! It is not a bug in cf per se, though it is a downstream effect that is leading to, at present, some errors such as this one which shouldn't be occurring and which are also obscure in terms of the user-facing message.
It is due to NumPy 2 and its backwards-incompatible API and other bevhaviour differences from v1 to v2: notice the environment with the error has numpy: 2.0.1
and the working environment has numpy: 1.26.4
.
@davidhassell I am going to create a numpy-2
label to mark Issues arising relating to that, so we can keep track and discuss how to handle them. Today Sharar was also seeing funky error messages I have never seen before with cf-plot, which I have only just clocked are due to her using an environment with NumPy 2. So NumPy 2 is starting to cause trouble for users already - would be good to review any updates we need for our libraries sooner rather than later.
When I try to create a subspace within a region and for a specific longitudean Index error occures, stating the field has a size 0 axis, I did this in VS code
However when I try the same code in the terminal, it works fine and produces the graph I want with the rest of the code.
Environment
cf.environment(paths=False)
In VS code (not working)In the terminal