fix python apis that are incompatible with scala apis (#1145)
fix python apis that are incompatible with scala apis (#1145)

* fix python apis that are incompatible with scala apis

* add test

intel-analytics/BigDL,intel-analytics/BigDL,yangw1234/BigDL,yangw1234/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,yangw1234/BigDL,yangw1234/BigDL