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.
Be best to have a blank line after the function definition, and also class definition in the next test.