Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FINAM
finam
Commits
c747b4ea
Commit
c747b4ea
authored
1 year ago
by
Sebastian Müller
🐈
Browse files
Options
Downloads
Patches
Plain Diff
grid: add data_points_compressed method
parent
980bda8e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!258
Grid mask support
Pipeline
#177443
passed with stages
in 4 minutes and 47 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/finam/data/grid_base.py
+8
-0
8 additions, 0 deletions
src/finam/data/grid_base.py
with
8 additions
and
0 deletions
src/finam/data/grid_base.py
+
8
−
0
View file @
c747b4ea
...
...
@@ -295,6 +295,14 @@ class Grid(GridBase):
out
[
~
mask
]
=
data
return
np
.
reshape
(
out
,
self
.
data_shape
,
order
=
self
.
order
)
@property
def
data_points_compressed
(
self
):
"""
Points of the associated compressed data.
"""
if
self
.
mask
is
None
:
return
self
.
data_points
# return only unmasked data points
return
self
.
data_points
[
~
np
.
reshape
(
self
.
mask
,
-
1
,
order
=
self
.
order
)]
class
StructuredGrid
(
Grid
):
"""
Abstract structured grid specification.
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment