Qube is an enormous class, and its implementation is divided into multiple files in the extensions directory. This is done by doing things like:
from polymath.qube import Qube
from polymath.extensions import broadcaster
Qube.broadcast_into_shape = broadcaster.broadcast_into_shape
Qube.broadcast_to = broadcaster.broadcast_to
Qube.broadcasted_shape = broadcaster.broadcasted_shape
Qube.broadcast = broadcaster.broadcast
This is really not a very Pythonic way to do things. Better would be to use mix-in classes. I tried to do this, and ran into some problems, particularly that there's no way to get Sphinx to show the docstrings for all the mixin superclasses. As a result I am abandoning this effort for now, but the work I did is on in PR #14 and branch rf_251204_mixins in case we ever want to resurrect it once Sphinx is fixed.
Qubeis an enormous class, and its implementation is divided into multiple files in theextensionsdirectory. This is done by doing things like:This is really not a very Pythonic way to do things. Better would be to use mix-in classes. I tried to do this, and ran into some problems, particularly that there's no way to get Sphinx to show the docstrings for all the mixin superclasses. As a result I am abandoning this effort for now, but the work I did is on in PR #14 and branch
rf_251204_mixinsin case we ever want to resurrect it once Sphinx is fixed.