Skip to content

Tests for the sqlite backend fail if floatX=float32 #1756

@aseyboldt

Description

@aseyboldt

The type conversion from numpy to sqlite seems to break for single precision floats:

Put floatX = float32 into .theanorc or THEANO_FLAGS and run the sqlite tests:

nosetests nosetests pymc3/tests/test_sqlite_backend.py

======================================================================
FAIL: test_standard_close (pymc3.tests.test_sqlite_backend.TestSQlite1dSampling)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/adr/git/pymc3/pymc3/tests/backend_fixtures.py", line 237, in test_standard_close
    np.zeros(self.strace.var_shapes[varname]))
  File "/usr/lib/python3.6/site-packages/numpy/testing/utils.py", line 322, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/usr/lib/python3.6/site-packages/numpy/testing/utils.py", line 813, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/lib/python3.6/site-packages/numpy/testing/utils.py", line 739, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: array([b'', b''], 
      dtype='|S4')
 y: array([ 0.,  0.]) 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions