a basic implementation for Image[] and related functions#363
Conversation
|
I think you only want 515aa66 and on right? Rather than making a new pull request to fix this I'd recommend something like: and the PR should update automatically. |
|
cherry pick worked like magic |
|
The current notebook only supports svg images. I think implementing this for the imathics branch only makes sense. (I'm currently trying to port the graphics/plot functionality over to using jupyter). |
| if n > 8192: | ||
| return evaluation.error('Colorize', 'toomany') | ||
|
|
||
| cmap = matplotlib.cm.get_cmap('hot', n) |
There was a problem hiding this comment.
It might be worth splitting the matplotlib dependency out (separate to scikit-image) if this is the only place it's used.
There was a problem hiding this comment.
I thought about this as well, but then scikit-image depends on matplotlib (and numpy and scipy), so it's probably not worth the effort:
https://github.com/scikit-image/scikit-image/blob/master/requirements.txt
|
Lots of great functionality here! I'm looking through this and woking on adding some error handling and docs/tests, see my |
|
@poke1024 how do you want to handle collaborating on this? Should I open a PR against your branch with my changes? |
|
I'm actually not sure what's best. I'm actually quite comfortable with doing PRs on your branch (and calling yours the definite version). |
|
Okay, if you think that's easier. I'll close this and open a separate PR. |
I'm submitting this to the iMathics branch as well now, since it doesn't seem to work on the regular Mathics notebook. It seems to be impossible to push HTML < img > tags into the regular Mathics notebook, which I'm doing in order to display the loaded images (Mathics gives an explicit error, saying that img nodes are an unknown node type). Jupyter doesn't have that limitation though. Needs scikit-image.