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.