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

Documentation: "Vectorized Operators and Functions" #5547

Closed
lucasb-eyer opened this issue Jan 26, 2014 · 6 comments
Closed

Documentation: "Vectorized Operators and Functions" #5547

lucasb-eyer opened this issue Jan 26, 2014 · 6 comments
Labels
docs This change adds or pertains to documentation
Milestone

Comments

@lucasb-eyer
Copy link
Contributor

The latest documentation doesn't match reality at all. I think this should be fixed before the 0.3 release, but I'm not sure on how to fix it myself.

This needs to be rephrased or split:

and any version of the operator may be used if one of the inputs is a scalar.

since #853 makes it false for 3. Comparison.
It's also not really true for ^, since A^2 is different from A.^2 and 2.^A works but 2^A doesn't. (I agree with what Julia does here.)

The following built-in functions are also vectorized, whereby the functions act element-wise:

max and min should probably be taken out of that list and a separate paragraph quickly explaining maximum and minimum added.
Is it intended that both minimum(A, A+2) and min(A, A+2) work? The former doesn't seem it should work reading the doc and #4235.

@JeffBezanson
Copy link
Member

You're absolutely right.

What do you mean by A.^2 not working? It seems to work for me.

@ivarne
Copy link
Member

ivarne commented Jan 27, 2014

Also minimum(A, A+2) will probably not do what you want, because the second parameter to minimum is called region and is used if you want the minimum value per region.

@lucasb-eyer
Copy link
Contributor Author

Oops, typo. I meant to say 2 ^ A. Fixed it in the issue.

@jiahao
Copy link
Member

jiahao commented Jan 27, 2014

If you really wanted to compute 2^A, you could do expm(ln(2)*A).

@lucasb-eyer
Copy link
Contributor Author

I don't want to compute these things, just pointing out how documentation != reality. Notice that I said "I agree with what Julia does here."

@jiahao
Copy link
Member

jiahao commented Jan 27, 2014

I'm merely suggesting a statment that could become part of the documentation fix.

@JeffBezanson JeffBezanson added this to the 0.3 milestone Feb 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

4 participants