katanaml / katana-assistant

Text based assistant powered by Machine Learning and NLP
http://katanaml.io
Apache License 2.0
99 stars 62 forks source link

Error in model.predict(inputvar) when testing a model in Jupyter notebook #28

Open stark2 opened 1 year ago

stark2 commented 1 year ago

ValueError Traceback (most recent call last)

in ----> 1 print(model.predict(inputvar)) ~/miniforge3/envs/.conda_venv/lib/python3.8/site-packages/numpy/core/arrayprint.py in _array_str_implementation(a, max_line_width, precision, suppress_small, array2string) 1504 return _guarded_repr_or_str(np.ndarray.__getitem__(a, ())) 1505 -> 1506 return array2string(a, max_line_width, precision, suppress_small, ' ', "") 1507 1508 ~/miniforge3/envs/.conda_venv/lib/python3.8/site-packages/numpy/core/arrayprint.py in array2string(a, max_line_width, precision, suppress_small, separator, prefix, style, formatter, threshold, edgeitems, sign, floatmode, suffix, **kwarg) 710 return "[]" 711 --> 712 return _array2string(a, options, separator, prefix) 713 714 ~/miniforge3/envs/.conda_venv/lib/python3.8/site-packages/numpy/core/arrayprint.py in wrapper(self, *args, **kwargs) 482 repr_running.add(key) 483 try: --> 484 return f(self, *args, **kwargs) 485 finally: 486 repr_running.discard(key) ~/miniforge3/envs/.conda_venv/lib/python3.8/site-packages/numpy/core/arrayprint.py in _array2string(a, options, separator, prefix) 508 509 # find the right formatting function for the array --> 510 format_function = _get_format_function(data, **options) 511 512 # skip over "[" ~/miniforge3/envs/.conda_venv/lib/python3.8/site-packages/numpy/core/arrayprint.py in _get_format_function(data, **options) 441 return formatdict['longfloat']() 442 else: --> 443 return formatdict['float']() 444 elif issubclass(dtypeobj, _nt.complexfloating): 445 if issubclass(dtypeobj, _nt.clongfloat): ~/miniforge3/envs/.conda_venv/lib/python3.8/site-packages/numpy/core/arrayprint.py in () 380 'int': lambda: IntegerFormat(data), 381 'float': lambda: --> 382 FloatingFormat(data, prec, fmode, supp, sign, legacy=legacy), 383 'longfloat': lambda: 384 FloatingFormat(data, prec, fmode, supp, sign, legacy=legacy), ~/miniforge3/envs/.conda_venv/lib/python3.8/site-packages/numpy/core/arrayprint.py in __init__(self, data, precision, floatmode, suppress_small, sign, **kwarg) 879 self.large_exponent = False 880 --> 881 self.fillFormat(data) 882 883 def fillFormat(self, data): ~/miniforge3/envs/.conda_venv/lib/python3.8/site-packages/numpy/core/arrayprint.py in fillFormat(self, data) 910 for x in finite_vals) 911 frac_strs, _, exp_strs = zip(*(s.partition('e') for s in strs)) --> 912 int_part, frac_part = zip(*(s.split('.') for s in frac_strs)) 913 self.exp_size = max(len(s) for s in exp_strs) - 1 914 ValueError: not enough values to unpack (expected 2, got 1)