Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build misc examples#6868

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 11 commits intomatplotlib:v2.xfromjenshnielsen:buildmiscexamples
Aug 7, 2016
Merged

Conversation

jenshnielsen
Copy link
Member

Fixes#6866

urllib has moved from python 2 to 3. file is no more.

In mlab:

iterkeys was being called on the keys instead of the dict.
Unicode strings need to be encoded on python2 to be used in np.dtype

Should probably still add some tests to test_mlab.

newdtype = np.dtype(rec.dtype.descr + list(zip(names, dtypes)))
old_dtypes = rec.dtype.descr
if six.PY2:
old_dtypes = [(a[0].encode('utf-8'), a[1]) for a in old_dtypes]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

A bit less cryptic variant:old_dtypes = [(name.encode('utf-8'), dt) for name, dt in old_dtypes]

dopplershift reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Agreed but I am not sure this is the right solution anyway. The recarray can handle unicode keys it's only that np.dtype cannot. We should probably do this in a completely different way

@tacaswelltacaswell added this to the2.0.1 (next bug fix release) milestoneAug 2, 2016
@tacaswell
Copy link
Member

I am inclined to merge this as-is. It improves things and we should not let the perfect be the enemy of the good here.

@jenshnielsen
Copy link
MemberAuthor

I will at least implement@Kojoley's suggestion

@jenshnielsenjenshnielsen changed the title[WIP] Build misc examplesBuild misc examplesAug 7, 2016
@jenshnielsen
Copy link
MemberAuthor

Implemented@Kojoley's sugestion. The proper solution is most likely to usefromrecords to build the recarrays but I don't want to make any more modifications to this code which should probably be deprecated and removed instead

@tacaswelltacaswell merged commit70e7a6c intomatplotlib:v2.xAug 7, 2016
@jenshnielsenjenshnielsen deleted the buildmiscexamples branchAugust 7, 2016 09:13
@QuLogicQuLogic modified the milestones:2.0 (style change major release),2.0.1 (next bug fix release)Aug 7, 2016
@QuLogicQuLogic mentioned this pull requestOct 15, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v2.0.0
Development

Successfully merging this pull request may close these issues.

4 participants
@jenshnielsen@tacaswell@Kojoley@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp