iris.util.new_axis
gives odd result if existing dim coord is passed
#4415
Labels
Good First Issue
A good issue to take on if you're just getting started with Iris development
Type: Bug
🐛 Bug Report
If the scalar coord passed to
iris.util.new_axis
is already a dimension coordinate, an anonymous new dimension is created.How To Reproduce
output:
Expected behaviour
I think we should probably get an exception if our "spam" coord is already a dim coord. It might be as simple as adding
dim_coords=False
in the call tosrc_cube.coord
here:iris/lib/iris/util.py
Lines 1116 to 1117 in ab1e699
Environment
The text was updated successfully, but these errors were encountered: