Skip to content

[pyos] 'C' is not defined in Operations docs #434

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

Closed
sneakers-the-rat opened this issue Apr 17, 2023 · 1 comment · Fixed by #440
Closed

[pyos] 'C' is not defined in Operations docs #434

sneakers-the-rat opened this issue Apr 17, 2023 · 1 comment · Fixed by #440
Labels
bug Something is broken documentation Improve or add to documentation

Comments

@sneakers-the-rat
Copy link

sneakers-the-rat commented Apr 17, 2023

The Operations docs

have examples like

A = gb.Matrix.from_coo([0, 0, 1, 1, 2], [1, 2, 0, 2, 1],
                       [2.0, 5.0, 1.5, 4.0, 0.5])
B = gb.Matrix.from_coo([0, 0, 1, 1, 2, 2], [1, 2, 0, 1, 1, 2],
                       [3., -2., 0., 6., 3., 1.])

# These are equivalent
C << A.ewise_mult(B, op='min')  # method style
C << gb.binary.min(A & B)  # functional style

but when I try and do either of these I get 'C' is not defined which is what I expected from prior documentation. Would recommend making these doctests so that the docs don't include erroneous examples

part of: pyOpenSci/software-submission#81

@eriknw
Copy link
Member

eriknw commented Apr 18, 2023

Thanks for the report! I consider this a bug. Code examples should be copy/paste-able.

I'm also a big fan of using doctests for ensuring correctness, so I'll add this as an item on our roadmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken documentation Improve or add to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants