Skip to content

Commit

Permalink
Avoid using mutable default. (#4918)
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo authored Aug 18, 2022
1 parent 7b00dbe commit 32317d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/iris/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ def format_array(arr):
return result


def new_axis(src_cube, scalar_coord=None, expand_extras=[]):
def new_axis(src_cube, scalar_coord=None, expand_extras=()):
"""
Create a new axis as the leading dimension of the cube, promoting a scalar
coordinate if specified.
Expand All @@ -1111,10 +1111,10 @@ def new_axis(src_cube, scalar_coord=None, expand_extras=[]):
* scalar_coord (:class:`iris.coord.Coord` or 'string')
Scalar coordinate to promote to a dimension coordinate.
* expand_extras (list)
List of auxiliary coordinates, ancillary variables and cell measures
that will be expanded so that they map to the new dimension as well
as the existing dimensions.
* expand_extras (iterable)
Auxiliary coordinates, ancillary variables and cell measures which will
be expanded so that they map to the new dimension as well as the
existing dimensions.
Returns:
A new :class:`iris.cube.Cube` instance with one extra leading dimension
Expand Down

0 comments on commit 32317d5

Please sign in to comment.