GValiente/pocket-tensor

make_test.py faulty

Closed this issue · 5 comments

By running the make_test.py i got the error located on in the pt.py file line 237:

TabError: inconsistent use of tabs and spaces in indentation

This line contains tabs instead of spaces as in the other lines.
After fixing this i'm getting another error:

File ".\make_tests.py", line 31, in <module>
    np.set_printoptions(precision=25, threshold=np.nan)
  File "C:\Python36\lib\site-packages\numpy\core\arrayprint.py", line 246, in set_printoptions
    floatmode, legacy)
  File "C:\Python36\lib\site-packages\numpy\core\arrayprint.py", line 93, in _make_options_dict
    raise ValueError("threshold must be numeric and non-NAN, try "
ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation

If you replace threshold=np.nan with threshold=sys.maxsize, it works as expected on both Python2 and Python3 (at least on my machine).

I'll update make_tests.py file ASAP.

Thanks for the issue.

I have updated make_tests.py.

Please check it out.

The first problem I described still exists:

TabError: inconsistent use of tabs and spaces in indentation

Line 237 in pt.py. This line contains tabs instead of spaces as in the other lines.

I have ran Pycharm's auto-indentation on both pt.py and make_tests.py files.
Please check them out.

Issue solved! Thanks for the quick response!