dhermes / bezier

Helper for Bézier Curves, Triangles, and Higher Order Objects
Apache License 2.0
266 stars 36 forks source link

Update README.md with all imports per example, so they can be copy-pasted? #210

Closed Pomax closed 3 years ago

Pomax commented 4 years ago

Right now the examples do not show which packages need to be imported, so while it is reasonable to guess what np is, for example, not everyone will have heard of numpy yet, and even if they have, they might not know that np is a common abbreviation for it - it's better to include all the import statements in the examples (including the import bezier one).

dhermes commented 4 years ago

Hey I know you! Thanks for the awesome https://github.com/Pomax/bezierjs and http://pomax.github.io/bezierjs/!

Pomax commented 4 years ago

hah, always fun to meet someone who's seen my work. And, of course, always nice to know it's been useful =)

dhermes commented 3 years ago

@Pomax I may try to tackle this soon, but not really sure how to go about it. I want to minimize imports (without hitting the minimum of 0) by just including them once per docs page.

For example https://bezier.readthedocs.io/en/2021.2.12/ just jumps right in with np.asfortranarray() and bezier.Curve(), so I'll be able to update those with two imports of numpy as np and bezier first. Just not sure how to be comprehensive and find all my docs pages.

dhermes commented 3 years ago

As of 6164b403b7e4bb956a4d2518bedef98e70a53641, here is the list of (59) files for me to go through:

Needs imports: