fix numpy deprecationWarning('using a non-integer number ...') in svm

Using the same strategy in #2791. 

This PR fixed three failed test cases related to

`DeprecationWarning(using a non-integer number instead of an integer will result in an error in the future)` 

in #2737, and the second one 

`DeprecationWarning('converting an array with ndim > 0 to an index will result in an error in the future',`

need more work to fix.