-
Notifications
You must be signed in to change notification settings - Fork 25
Misc fix #43
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some thoughts; overall looks good but yeah let's wait for the async PR to be merged!
return None | ||
|
||
# Extract mesh | ||
points = b64_encode_numpy(vtk_to_numpy(polydata.GetPoints().GetData())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this always be float32 or int64?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be either float32 or float64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect
# We have a numpy array that is compatible with JavaScript typed | ||
# arrays | ||
buffer = base64.b64encode(memoryview(obj.ravel(order="C"))).decode("utf-8") | ||
return {"bvals": buffer, "dtype": str(dtype), "shape": obj.shape} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that the original code was meant for 1D numpy array. I don't think that creates any problem for obj.shape (since a python tuple should be easy to convert to JS), but i'm curious whether there will be needs to do any modification on the JS side for that to work...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the vtk side we expect 1D, we don't care about the shape... Just kept it for @nicolaskruchten . ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
@jourdain The PR is merged; I think what you added looks good on the python side, do you have anything else in mind on the JS side? |
If we use [email protected] we are good... |
@xhlulu I let you merge it and eventually create a version 1.0.0 is everything is working as expected. Normally the F1 demo should be faster with that one. |
@jourdain Do you get this error locally? |
I guess I'll have to try that specific example... |
It looks like the cell connectivity get messed up. Along with some point coordinates not being correct... |
@xhlulu that should be good now... Good catch! |
@jourdain awesome. Updating the change log and will create a release afterwards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
Need to rebase from the async but fix css typo in demos and add support for encoded binary arrays.
closes #42