GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — #28 Update dims module · sdarray/sdarray@da8311d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • sdarray
    • dims.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎sdarray/dims.py‎

Copy file name to clipboardExpand all lines: sdarray/dims.py
+9-6Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,32 @@
66

77

88
# dependencies
9+
import numpy as np
910
from typing_extensions import Literal
1011
from xarray_dataclasses import Attr, Data
1112

1213

1314
# constants
1415
time = Literal["time"]
16+
"""Type hint for the time axis."""
1517
chan = Literal["chan"]
18+
"""Type hint for the channel axis."""
1619

1720

1821
# dataclasses
1922
@dataclass
2023
class Time:
21-
"""Time in UTC."""
24+
"""Start time in UTC."""
2225

23-
data: Data[time, Literal["M8[ns]"]]
24-
long_name: Attr[str] = "Time in UTC"
26+
data: Data[time, np.datetime64]
27+
long_name: Attr[str] = "Start time in UTC"
2528
short_name: Attr[str] = "time"
2629

2730

2831
@dataclass
2932
class Chan:
30-
"""Channel ID."""
33+
"""Channel number."""
3134

32-
data: Data[chan, Literal["i8"]]
33-
long_name: Attr[str] = "Channel ID"
35+
data: Data[chan, np.int64]
36+
long_name: Attr[str] = "Channel number"
3437
short_name: Attr[str] = "chan"

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.