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
dd8747c7
Commit
dd8747c7
authored
Nov 04, 2012
by
Andreas Mueller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
woah that was unexpected
parent
aab23cd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
wordcloud.py
wordcloud.py
+3
-3
No files found.
wordcloud.py
View file @
dd8747c7
...
...
@@ -45,8 +45,8 @@ def make_wordcloud(words, counts, width=400, height=200):
# recompute integral image
img_array
=
np
.
asarray
(
img
)
# recompute bottom right
partial_integral
=
np
.
cumsum
(
np
.
cumsum
(
img_array
[
x
:,
y
:],
axis
=
0
),
axis
=
1
)
partial_integral
=
np
.
cumsum
(
np
.
cumsum
(
img_array
[
x
:,
y
:],
axis
=
1
),
axis
=
0
)
# paste into old image
# if x or y is zero it is a bit annoying
if
x
>
0
:
...
...
@@ -71,4 +71,4 @@ if __name__ == "__main__":
words
=
np
.
array
(
cv
.
get_feature_names
())
words
=
words
[
counts
>
1
]
counts
=
counts
[
counts
>
1
]
make_wordcloud
(
words
,
counts
,
width
=
800
,
height
=
6
00
)
make_wordcloud
(
words
,
counts
,
width
=
400
,
height
=
3
00
)
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