Skip to content

Commit

Permalink
change default name to string of date
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah-hlsn committed Nov 8, 2023
1 parent 1cc4502 commit 77d2727
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions climada/hazard/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def from_xarray_raster(
:py:meth:`Hazard.__init__` for details.
* ``hazard_type``: Empty string
* ``frequency``: 1.0 for every event
* ``event_name``: String representation of the event id
* ``event_name``: String representation of the event time
* ``event_id``: Consecutive integers starting at 1 and increasing with time
crs : str, optional
Identifier for the coordinate reference system of the coordinates. Defaults
Expand Down Expand Up @@ -840,7 +840,7 @@ def maybe_repeat(values: np.ndarray, times: int) -> np.ndarray:
None,
np.ones(num_events),
np.array(range(num_events), dtype=int) + 1,
[str(x) for x in np.array(range(num_events), dtype=int) + 1],
[str(x) for x in data[coords["event"]].values],
np.array(u_dt.datetime64_to_ordinal(data[coords["event"]].values)),
],
# The accessor for the data in the Dataset
Expand Down

0 comments on commit 77d2727

Please sign in to comment.