Issue/2582

Fixed issue #2582. If the function passed into the apply_along_axis function returned anything other than a "scalar" or "array-like object" then it would throw an exception that len method did not exist.
Looks like you have extended things a bit, an explanation of what the change adds would help.