Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
geomultisens
gms_preprocessing
Commits
1c3c893e
Commit
1c3c893e
authored
Oct 26, 2017
by
Daniel Scheffler
Browse files
Fixed matplotlib.use() issue.
parent
44b7b4e5
Pipeline
#1443
passed with stage
in 10 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/test_kmeans.py
View file @
1c3c893e
...
...
@@ -10,13 +10,9 @@ Tests for gms_preprocessing.algorithms.L2B_P.KMeansRSImage
import
unittest
import
os
import
matplotlib
import
numpy
as
np
from
sklearn.cluster
import
k_means_
matplotlib
.
use
(
'Template'
)
# disables matplotlib figure popups
from
geoarray
import
GeoArray
# noqa E402 module level import not at top of file
from
gms_preprocessing
import
__file__
# noqa E402 module level import not at top of file
...
...
@@ -39,6 +35,8 @@ class Test_KMeansRSImage(unittest.TestCase):
cls
.
geoArr
.
to_mem
()
cls
.
kmeans
=
KMeansRSImage
(
cls
.
geoArr
,
n_clusters
=
10
)
os
.
environ
[
'MPLBACKEND'
]
=
'Template'
# disables matplotlib figure popups # NOTE: import geoarray sets 'Agg'
def
test_compute_clusters
(
self
):
self
.
kmeans
.
compute_clusters
()
self
.
assertIsInstance
(
self
.
kmeans
.
clusters
,
k_means_
.
KMeans
)
...
...
Daniel Scheffler
@danschef
mentioned in commit
b92cffe8
·
Feb 06, 2018
mentioned in commit
b92cffe8
mentioned in commit b92cffe8568d626c5ae0b906aa26573246c99c08
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment