Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stark2 opened this issue Nov 27, 2022 · 0 comments
Open

Comments

@stark2
Copy link

stark2 commented Nov 27, 2022


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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant