Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: onnx/onnxmltools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 69bf11d0dc85d4202ab44c3718fa11d6be4a8c9f
Choose a base ref
..
head repository: onnx/onnxmltools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 791eb5a7381175dfdcd8355537822bd90a167a74
Choose a head ref
Showing with 9 additions and 9 deletions.
  1. +9 −9 onnxmltools/convert/sparkml/utils.py
18 changes: 9 additions & 9 deletions onnxmltools/convert/sparkml/utils.py
Original file line number Diff line number Diff line change
@@ -14,16 +14,16 @@ def buildInitialTypesSimple(dataframe):


def getTensorTypeFromSpark(sparktype):
if sparktype == 'StringType':
if sparktype == 'StringType' or sparktype == 'StringType()':
return StringTensorType([1, 1])
elif sparktype == 'DecimalType' \
or sparktype == 'DoubleType' \
or sparktype == 'FloatType' \
or sparktype == 'LongType' \
or sparktype == 'IntegerType' \
or sparktype == 'ShortType' \
or sparktype == 'ByteType' \
or sparktype == 'BooleanType':
elif sparktype == 'DecimalType' or sparktype == 'DecimalType()' \
or sparktype == 'DoubleType' or sparktype == 'DoubleType()' \
or sparktype == 'FloatType' or sparktype == 'FloatType()' \
or sparktype == 'LongType' or sparktype == 'LongType()' \
or sparktype == 'IntegerType' or sparktype == 'IntegerType()' \
or sparktype == 'ShortType' or sparktype == 'ShortType()' \
or sparktype == 'ByteType' or sparktype == 'ByteType()' \
or sparktype == 'BooleanType' or sparktype == 'BooleanType()':
return FloatTensorType([1, 1])
else:
raise TypeError("Cannot map this type to Onnx types: " + sparktype)