document the difference between float32 and Float32, etc.#146
document the difference between float32 and Float32, etc.#146mgautam98 wants to merge 1 commit intoJuliaImages:sourcefrom
Conversation
johnnychen94
left a comment
There was a problem hiding this comment.
Thanks for doing this! I opened that issue as a memo to myself but apparently you're handling it rather eagerly.
It's really nice to see these improvements in the documentation.
timholy
left a comment
There was a problem hiding this comment.
This is a great idea, thanks for tackling this.
d513c22 to
85f1cab
Compare
docs/src/tutorials/arrays_colors.md
Outdated
| [...] | ||
| ``` | ||
| **Note**: `Float64.(rgb_img)` throws error because it does not implicitly | ||
| convert RGB to single channel but `float64.(rgb_img)` works as expected. |
There was a problem hiding this comment.
"Works as expected" depends entirely on what your expectations are. Some people will expect it to return a single floating-point number.
How about copy/pasting the examples with a single colorant object that I gave in my explanation to you? This mixes together broadcasting with colorspace conversion, and we don't have to mix the concepts.
|
I'd like to also add the following table into the document as a cheat sheet: The following table tells you how you can convert from a number/colorant to another number/colorant
Or maybe a simplified version by removing the explicit construction ones:
I personally like the simplified version because it shows all the convenient way of converting things in JuliaImages. @timholy will the usage of |
85f1cab to
134e24a
Compare
|
@johnnychen94 this cheat-sheet is really helpful. |
Solves #139
Added documentation to advertise the usage of lower-cased forms of Float32, Float64 etc