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

Ljson nan fix #557

Merged
merged 9 commits into from Feb 20, 2015
Merged

Ljson nan fix #557

merged 9 commits into from Feb 20, 2015

Conversation

patricksnape
Copy link
Contributor

Similar to the fix for 0.4.x, but with two extra additions:

  1. Python 3 fixes
  2. New method on Vectorizable objects: has_nan_values(). This method is just syntactic sugar for checking if a PointCloud, Image, or LandmarkGroup has nan values, in case you don't want to import them for example.

patricksnape and others added 9 commits February 19, 2015 14:56
Simple try/except pattern - try images then landmarks.
Now importing null values is correctly coerced to nan
instead of None

Also, added tests for this.
When serializing nan values from menpo, they should go down
as null. When deserializing null values, they should be returned
as nan.
Conflicts:
	menpo/io/input/landmark.py
Missing itertools from merge, use correct builtins string
when mocking and turn zip generator into list for serialization.
Makes Python 3 complain
This checks if the vectorizable object contains any nan values.
This is very useful for things like landmarks that contains nan
values.
This makes it simpler for importing to check it a landmark
group has nan values and thus is no good for building models.
@jabooth
Copy link
Member

jabooth commented Feb 20, 2015

Looks great, +1

jabooth added a commit that referenced this pull request Feb 20, 2015
@jabooth jabooth merged commit a0aca1e into menpo:master Feb 20, 2015
@jabooth jabooth deleted the ljson_nan_fix branch February 20, 2015 08:26
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.

None yet

2 participants