Skip to content

ComparerCollection.sel(), time arg errors when selecting a month where some comparers have no temporal overlap #668

Description

@ryan-kipawa

Steps to reproduce:

This works:

import modelskill as ms
cc = ms.data.oresund()

cc.sel(time=slice("2022-01-03 00:00:00", "2022-01-03 00:00:00")

This fails:

import modelskill as ms
cc = ms.data.oresund()

cc.sel(time=slice("2022-01-03")

Likely caused by this comparer failing:

cc["Koege"].sel(time=slice("2022-01-03")

Expected behaviour:

Should work the same way when using an explicit slice as using a implicit time period. Selecting a time period with no data should return an empty comparer, and on a comparer collection it gets removed (as it already works today).

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions