Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
35
Issue boards
Milestones
Wiki
Code
Merge requests
7
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
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
rdm-software
SaQC
Commits
9cbe3815
Commit
9cbe3815
authored
3 years ago
by
Bert Palm
🎇
Browse files
Options
Downloads
Patches
Plain Diff
fixed dios warnings
parent
2b672e18
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!370
Release 2.0
,
!333
fixed dios warnings
Pipeline
#49207
passed with stage
in 1 minute and 34 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dios/dios/base.py
+2
-1
2 additions, 1 deletion
dios/dios/base.py
dios/test/test__ops__.py
+6
-0
6 additions, 0 deletions
dios/test/test__ops__.py
dios/test/test__setget__aloc.py
+3
-1
3 additions, 1 deletion
dios/test/test__setget__aloc.py
dios/test/test_setup.py
+5
-6
5 additions, 6 deletions
dios/test/test_setup.py
with
16 additions
and
8 deletions
dios/dios/base.py
+
2
−
1
View file @
9cbe3815
...
...
@@ -128,7 +128,8 @@ class _DiosBase:
raise
TypeError
(
"
data type not understood
"
)
for
k
in
data
:
self
.
_insert
(
k
,
pd
.
Series
(
data
[
k
],
index
=
index
))
s
=
pd
.
Series
(
data
[
k
],
index
=
index
,
dtype
=
object
).
infer_objects
()
self
.
_insert
(
k
,
s
)
# ----------------------------------------------------------------------
# checks
...
...
This diff is collapsed.
Click to expand it.
dios/test/test__ops__.py
+
6
−
0
View file @
9cbe3815
#!/usr/bin/env python
import
pytest
from
.test_setup
import
*
...
...
@@ -21,6 +23,8 @@ def test__eq__(left, right):
assert
res
==
exp
@pytest.mark.filterwarnings
(
"
ignore: invalid value encountered in long_scalars
"
)
@pytest.mark.filterwarnings
(
"
ignore: divide by zero encountered in long_scalars
"
)
@pytest.mark.parametrize
(
"
left
"
,
diosFromMatr
(
DATA_ALIGNED
))
@pytest.mark.parametrize
(
"
right
"
,
diosFromMatr
(
DATA_ALIGNED
))
@pytest.mark.parametrize
(
"
op
"
,
OP2
)
...
...
@@ -39,6 +43,8 @@ def test__op2__aligningops(left, right, op):
assert
res
==
exp
@pytest.mark.filterwarnings
(
"
ignore: invalid value encountered in long_scalars
"
)
@pytest.mark.filterwarnings
(
"
ignore: divide by zero encountered in long_scalars
"
)
@pytest.mark.parametrize
(
"
left
"
,
diosFromMatr
(
DATA_UNALIGNED
))
@pytest.mark.parametrize
(
"
right
"
,
diosFromMatr
(
DATA_UNALIGNED
))
@pytest.mark.parametrize
(
"
op
"
,
OPNOCOMP
)
...
...
This diff is collapsed.
Click to expand it.
dios/test/test__setget__aloc.py
+
3
−
1
View file @
9cbe3815
...
...
@@ -4,7 +4,9 @@ from pandas.core.dtypes.common import is_scalar
pytestmark
=
pytest
.
mark
.
skip
@pytest.mark.parametrize
((
"
idxer
"
,
"
exp
"
),
[(
"
a
"
,
s1
),
(
"
c
"
,
s3
),
(
"
x
"
,
pd
.
Series
())])
@pytest.mark.parametrize
(
(
"
idxer
"
,
"
exp
"
),
[(
"
a
"
,
s1
),
(
"
c
"
,
s3
),
(
"
x
"
,
pd
.
Series
(
dtype
=
float
))]
)
def
test__getitem_aloc_singleCol
(
dios_aligned
,
idxer
,
exp
):
di
=
dios_aligned
.
aloc
[:,
idxer
]
assert
isinstance
(
di
,
pd
.
Series
)
...
...
This diff is collapsed.
Click to expand it.
dios/test/test_setup.py
+
5
−
6
View file @
9cbe3815
...
...
@@ -24,10 +24,10 @@ except ModuleNotFoundError:
import
pandas
as
pd
import
numpy
as
np
a
=
pd
.
Series
(
range
(
0
,
70
,
7
))
b
=
pd
.
Series
(
range
(
5
,
15
,
1
))
c
=
pd
.
Series
(
range
(
7
,
107
,
10
))
d
=
pd
.
Series
(
range
(
0
,
10
,
1
))
a
=
pd
.
Series
(
range
(
0
,
70
,
7
)
,
dtype
=
int
)
b
=
pd
.
Series
(
range
(
5
,
15
,
1
)
,
dtype
=
int
)
c
=
pd
.
Series
(
range
(
7
,
107
,
10
)
,
dtype
=
int
)
d
=
pd
.
Series
(
range
(
0
,
10
,
1
)
,
dtype
=
int
)
s1
,
s2
,
s3
,
s4
=
a
,
b
,
c
,
d
...
...
@@ -330,8 +330,7 @@ OP1 = list(_OP1_MAP)
def
diosFromMatr
(
mlist
):
l
=
[]
for
m
in
mlist
:
m
=
np
.
array
(
m
)
l
.
append
(
DictOfSeries
(
m
.
copy
()))
l
.
append
(
DictOfSeries
({
i
:
li
.
copy
()
for
i
,
li
in
enumerate
(
m
)}))
return
tuple
(
l
)
...
...
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