Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
word_cloud_est
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
keeleliin
word_cloud_est
Commits
e568109a
Commit
e568109a
authored
Apr 29, 2015
by
Andreas Mueller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix boolean mask
parent
3308a89f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
wordcloud/wordcloud.py
wordcloud/wordcloud.py
+2
-2
No files found.
wordcloud/wordcloud.py
View file @
e568109a
...
...
@@ -186,8 +186,8 @@ class WordCloud(object):
if
mask
.
ndim
==
2
:
boolean_mask
=
mask
==
255
elif
mask
.
ndim
==
3
:
#
"OR" the color channels
boolean_mask
=
np
.
sum
(
mask
[:,
:,
:
3
]
==
255
,
axis
=-
1
)
#
if all channels are white, mask out
boolean_mask
=
np
.
all
(
mask
[:,
:,
:
3
]
==
255
,
axis
=-
1
)
else
:
raise
ValueError
(
"Got mask of invalid shape: %s"
%
str
(
mask
.
shape
))
# the order of the cumsum's is important for speed ?!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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