Converted python and cython implementations of prism to new format