Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
madarrays
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
skmad-suite
madarrays
Commits
f1e39868
Commit
f1e39868
authored
6 years ago
by
valentin.emiya
Browse files
Options
Downloads
Patches
Plain Diff
fix tests for __str__ methods
parent
2f5c5701
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
madarrays/tests/test_madarray.py
+5
-2
5 additions, 2 deletions
madarrays/tests/test_madarray.py
madarrays/tests/test_waveform.py
+1
-1
1 addition, 1 deletion
madarrays/tests/test_waveform.py
with
6 additions
and
3 deletions
madarrays/tests/test_madarray.py
+
5
−
2
View file @
f1e39868
...
...
@@ -664,6 +664,7 @@ class TestMadArray:
def
test_str_repr
(
self
):
# test when no data is missing
x
=
np
.
copy
(
self
.
x_float
)
arr_str
=
np
.
ndarray
.
__str__
(
x
)
...
...
@@ -671,6 +672,7 @@ class TestMadArray:
string
=
'
MadArray, dtype=float64, 0 missing entries (0.0%)
\n
{}
'
assert
str
(
ma
)
==
string
.
format
(
arr_str
)
# test with missing data, float values
x
[
self
.
m
]
=
np
.
nan
arr_str
=
np
.
ndarray
.
__str__
(
x
)
arr_str
=
arr_str
.
replace
(
'
nan
'
,
'
x
'
)
...
...
@@ -683,6 +685,7 @@ class TestMadArray:
string
=
'
<MadArray at {}>
'
assert
repr
(
ma
)
==
string
.
format
(
hex
(
id
(
ma
)))
# test with missing data, float values from int
x
=
np
.
copy
(
self
.
x_int
).
astype
(
np
.
float64
)
x
[
self
.
m
]
=
np
.
nan
arr_str
=
np
.
ndarray
.
__str__
(
x
)
...
...
This diff is collapsed.
Click to expand it.
madarrays/tests/test_waveform.py
+
1
−
1
View file @
f1e39868
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