Skip to content

Commit

Permalink
unit=None for ids
Browse files Browse the repository at this point in the history
  • Loading branch information
nvaytet committed Oct 7, 2024
1 parent 70a9d02 commit 52e65b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ skip-string-normalization = true
[tool.isort]
skip_gitignore = true
profile = "black"

[tool.ruff.format]
quote-style = "preserve"
6 changes: 3 additions & 3 deletions src/tof/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def __init__(
"time": pulse_params["time"],
"wavelength": pulse_params["wavelength"],
"speed": pulse_params["speed"],
"id": sc.arange("event", pulse_params["time"].size).fold(
"id": sc.arange("event", pulse_params["time"].size, unit=None).fold(
"event", sizes=pulse_params["time"].sizes
),
},
Expand Down Expand Up @@ -273,7 +273,7 @@ def from_neutrons(
"time": birth_times,
"wavelength": wavelengths,
"speed": wavelength_to_speed(wavelengths).to(unit="m/s", copy=False),
"id": sc.arange("event", birth_times.size).fold(
"id": sc.arange("event", birth_times.size, unit=None).fold(
"event", sizes=birth_times.sizes
),
},
Expand Down Expand Up @@ -332,7 +332,7 @@ def from_distribution(
"time": pulse_params["time"],
"wavelength": pulse_params["wavelength"],
"speed": pulse_params["speed"],
"id": sc.arange("event", pulse_params["time"].size).fold(
"id": sc.arange("event", pulse_params["time"].size, unit=None).fold(
"event", sizes=pulse_params["time"].sizes
),
},
Expand Down

0 comments on commit 52e65b1

Please sign in to comment.