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
b650e51d
Commit
b650e51d
authored
5 months ago
by
Sebastian Müller
🐈
Browse files
Options
Downloads
Patches
Plain Diff
mask eq check fixes
parent
7cc5e64f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!286
Add mask to Info object
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/finam/data/tools.py
+3
-1
3 additions, 1 deletion
src/finam/data/tools.py
with
3 additions
and
1 deletion
src/finam/data/tools.py
+
3
−
1
View file @
b650e51d
...
...
@@ -834,7 +834,7 @@ def _mask_eq(this, other):
if
this
in
list
(
Mask
)
and
other
in
list
(
Mask
):
return
this
==
other
# need a valid mask at this point
if
not
np
.
ma
.
is_mask
(
this
)
or
np
.
ma
.
is_mask
(
other
):
if
not
np
.
ma
.
is_mask
(
this
)
or
not
np
.
ma
.
is_mask
(
other
):
return
False
# special treatment of "nomask"
if
this
is
np
.
ma
.
nomask
:
...
...
@@ -844,6 +844,8 @@ def _mask_eq(this, other):
if
other
is
np
.
ma
.
nomask
:
return
not
np
.
any
(
this
)
# compare masks
if
not
np
.
ndim
(
this
)
==
np
.
ndim
(
other
):
return
False
if
not
np
.
all
(
np
.
shape
(
this
)
==
np
.
shape
(
other
)):
return
False
return
np
.
all
(
this
==
other
)
...
...
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