Skip to content
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

[WIP] Subclassing #188

Closed
wants to merge 12 commits into from
Closed

Conversation

andrewgsavage
Copy link
Contributor

This uses the subclassing approach I mentioned in #187, splitting AffineScalarFunc into a few smaller files to make it easier to work with.

For example, if you're looking at formatting you should only need to look at the formatting.py. This is much smaller than the current core.py and only contains code relevant to formatting so you won't get lost looking at other functionality like adding or equality.

The numpy functionality is WIP but IIRC the tests were working without that.

@andrewgsavage
Copy link
Contributor Author

implementing __array_ufunc__ gets the existing numpy functionality back (unumpy tests pass again). I've just looped over arrays elementwise applying wrapped numpy funcs rather than using the wrap_array_func in unumpy.

I think a more generic version of wrap_array_func that can accept ndarrays as any arg or kwarg will be needed for the numpy functions that operate on arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant