Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalar timeseries dimension #149

Open
Beforerr opened this issue Aug 18, 2024 · 3 comments
Open

Scalar timeseries dimension #149

Beforerr opened this issue Aug 18, 2024 · 3 comments

Comments

@Beforerr
Copy link

  • Speasy version: 1.4

Description

The scalar timeseries data should only have one dimension. But ndim is 2. I am not sure if this is a bug or feature.

What I Did

products = "cda/THB_L2_MOM/thb_peim_densityQ"
timerage = ["2016-05-20T17:47:00", "2016-05-20T17:53:40"]
d = spz.get_data(products, timerage)
d.ndim == 2
@jeandet
Copy link
Member

jeandet commented Aug 18, 2024

@Beforerr, yes this was a design choice I made at the beginning to be consistent with what Pandas does.

@Beforerr
Copy link
Author

Beforerr commented Aug 18, 2024 via email

@jeandet
Copy link
Member

jeandet commented Aug 19, 2024

I would say:

def is_scalar(v):
    return len(v.shape)==2 and v.shape[1]==1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants