Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert np.float to float for positions #608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spacewaterbear
Copy link

convert np.float to float (native python). It cannot be jsonify otherwise

convert np.float to float (native python). It cannot be jsonify otherwise
@amueller
Copy link
Owner

Hey, thanks for the PR. What is your goal?

@spacewaterbear
Copy link
Author

Hey, thanks for the PR. What is your goal?

Hello, I use your library to return the .layout_ of a WordCloud and return it as a json. For that I use jsonify from flask but it return an error when there are np.int inside

@amueller
Copy link
Owner

Sorry for the slow reply. You could just do this conversion on your side, right? It should be pretty easy to iterate over .layout_ and do the casting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants