from pyparty import Canvas
c=Canvas.random_circles()
c.show();
def compare(img):
ax1, ax2, ax3 = splot(1,3)
showim(img, ax1)
showim(invert(img), ax2)
showim(img + invert(img), ax3, title='sum');
print img.min(), img.max()
print invert(img).min(), invert(img).max()
from pyparty.utils import invert
from pyparty import splot, showim
compare(c.grayimage)
22 255 0 233
/home/adam/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/skimage/util/dtype.py:107: UserWarning: Possible precision loss when converting from float64 to uint8 "%s to %s" % (dtypeobj_in, dtypeobj))
compare(c.image)
0.0313725490196 1.0 0.0 0.96862745098