-
Notifications
You must be signed in to change notification settings - Fork 9
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
Valid min and valid max #168
Conversation
|
||
class DataContainerProtocol(Protocol[T]): | ||
def select(self, indices, inplace=False) -> T: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
|
||
@staticmethod | ||
def from_dictionary(dictionary: Dict[str, str or Dict[str, str] or List], dtype=np.float64) -> T: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
|
||
@property | ||
def values(self) -> np.array: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
|
||
@property | ||
def nbytes(self) -> int: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
|
||
@staticmethod | ||
def reserve_like(other: T, length: int = 0) -> T: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
... | ||
|
||
def __getitem__(self, key) -> T: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
... | ||
|
||
def __setitem__(self, k, v: Union[T, float, int]): | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
... | ||
|
||
def __len__(self) -> int: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
|
||
@property | ||
def shape(self): | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
|
||
@property | ||
def name(self) -> str: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
|
||
@property | ||
def nbytes(self) -> int: | ||
... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
9ebf798
to
8bd20df
Compare
e0c2f14
to
6fbed5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very usefull!
But I detect a problem when I apply a condition on a vector:
import speasy as spz
data = spz.get_data(spz.inventories.tree.cda.ACE.MAG.AC_H0_MFI.BGSM, '2008-01-01T00:00:00', '2008-01-01T00:10:00')
print(data[data<0].time)
['2008-01-01T00:00:08.000000000' '2008-01-01T00:00:08.000000000'
'2008-01-01T00:00:24.000000000' '2008-01-01T00:00:24.000000000'
'2008-01-01T00:00:40.000000000' '2008-01-01T00:00:40.000000000'
'2008-01-01T00:00:56.000000000' '2008-01-01T00:00:56.000000000'
'2008-01-01T00:01:12.000000000' '2008-01-01T00:01:12.000000000'
'2008-01-01T00:01:28.000000000' '2008-01-01T00:01:28.000000000'
'2008-01-01T00:01:44.000000000' '2008-01-01T00:01:44.000000000'
'2008-01-01T00:02:00.000000000' '2008-01-01T00:02:00.000000000'
'2008-01-01T00:02:16.000000000' '2008-01-01T00:02:16.000000000'
'2008-01-01T00:02:32.000000000' '2008-01-01T00:02:32.000000000'
'2008-01-01T00:02:48.000000000' '2008-01-01T00:02:48.000000000'
'2008-01-01T00:03:04.000000000' '2008-01-01T00:03:04.000000000'
'2008-01-01T00:03:20.000000000' '2008-01-01T00:03:20.000000000'
'2008-01-01T00:03:36.000000000' '2008-01-01T00:03:36.000000000'
'2008-01-01T00:03:52.000000000' '2008-01-01T00:03:52.000000000'
'2008-01-01T00:04:08.000000000' '2008-01-01T00:04:08.000000000'
'2008-01-01T00:04:24.000000000' '2008-01-01T00:04:24.000000000'
'2008-01-01T00:04:40.000000000' '2008-01-01T00:04:40.000000000'
'2008-01-01T00:04:56.000000000' '2008-01-01T00:04:56.000000000'
'2008-01-01T00:05:12.000000000' '2008-01-01T00:05:12.000000000'
'2008-01-01T00:05:28.000000000' '2008-01-01T00:05:28.000000000'
'2008-01-01T00:05:44.000000000' '2008-01-01T00:05:44.000000000'
'2008-01-01T00:06:00.000000000' '2008-01-01T00:06:00.000000000'
'2008-01-01T00:06:16.000000000' '2008-01-01T00:06:16.000000000'
'2008-01-01T00:06:32.000000000' '2008-01-01T00:06:32.000000000'
'2008-01-01T00:06:48.000000000' '2008-01-01T00:07:04.000000000'
'2008-01-01T00:07:20.000000000' '2008-01-01T00:07:36.000000000'
'2008-01-01T00:07:52.000000000' '2008-01-01T00:08:08.000000000'
'2008-01-01T00:08:24.000000000' '2008-01-01T00:08:40.000000000'
'2008-01-01T00:08:56.000000000' '2008-01-01T00:09:12.000000000'
'2008-01-01T00:09:12.000000000' '2008-01-01T00:09:28.000000000'
'2008-01-01T00:09:28.000000000' '2008-01-01T00:09:44.000000000']
It seems that a record is duplicated each time that the condition is satisfied on a component
I have something similar with sanitized method:
import speasy as spz
data = spz.get_data(spz.inventories.tree.cda.ACE.MAG.AC_H0_MFI.BGSM, '2008-01-16T15:23:00', '2008-01-16T15:25:00')
print(data.time)
print(data.sanitized().time)
>>> print(data.time)
['2008-01-16T15:23:01.000000000' '2008-01-16T15:23:17.000000000'
'2008-01-16T15:23:33.000000000' '2008-01-16T15:23:49.000000000'
'2008-01-16T15:24:05.000000000' '2008-01-16T15:24:21.000000000'
'2008-01-16T15:24:37.000000000' '2008-01-16T15:24:53.000000000']
>>> print(data.sanitized().time)
['2008-01-16T15:23:01.000000000' '2008-01-16T15:23:01.000000000'
'2008-01-16T15:23:01.000000000' '2008-01-16T15:23:17.000000000'
'2008-01-16T15:23:17.000000000' '2008-01-16T15:23:17.000000000'
'2008-01-16T15:23:33.000000000' '2008-01-16T15:23:33.000000000'
'2008-01-16T15:23:33.000000000' '2008-01-16T15:24:05.000000000'
'2008-01-16T15:24:05.000000000' '2008-01-16T15:24:05.000000000'
'2008-01-16T15:24:21.000000000' '2008-01-16T15:24:21.000000000'
'2008-01-16T15:24:21.000000000' '2008-01-16T15:24:37.000000000'
'2008-01-16T15:24:37.000000000' '2008-01-16T15:24:37.000000000'
'2008-01-16T15:24:53.000000000' '2008-01-16T15:24:53.000000000'
'2008-01-16T15:24:53.000000000']
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
It is now possible to do something like var[var>10]=52 Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
6fbed5b
to
2f4e13d
Compare
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2f4e13d
to
924c97a
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
closes #161