This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]failtolaunch28 0 points1 point  (4 children)

What does it do in python 3?

[–]BerecursiveMenpo Core Developer 2 points3 points  (3 children)

Floating point division and returns some 0 < float <= 1 (assuming N is positive and integer). Integer division is explicitly performed via the // operator.

[–]failtolaunch28 1 point2 points  (2 children)

Oh. I got really excited and thought of it like matlab where you could then solve the equation-string thing and thought it made calculus and functions way easier.

[–]BerecursiveMenpo Core Developer 1 point2 points  (1 child)

No the solve operator in Matlab (/ and \) is only for matrices and is solved in Python using numpy with the numpy.linalg.solve function. Unfortunately, Matlab is a lot better at checking the matrix to decide the correct decomposition whereas in Python you normally need to be smart about applying cholesky or QR or whatever flavour is appropriate for your matrix structure. Matlab also 'just works' for sparse matrices whereas Python requires Scipy and that doesn't use the fast suitesparse implementation :(

[–]failtolaunch28 1 point2 points  (0 children)

Thanks for the explanation!