============================= test session starts ==============================
platform linux -- Python 3.6.10, pytest-5.4.3, py-1.8.2, pluggy-0.13.1
rootdir: /home/aryaman4/pyfilter/test, inifile: pytest.ini
collected 29 items

filters.py F....                                                         [ 17%]
inference.py .                                                           [ 20%]
model.py .                                                               [ 24%]
resampling.py ..                                                         [ 31%]
timeseries.py ...............                                            [ 82%]
utils.py .....                                                           [100%]

=================================== FAILURES ===================================
______________________________ Tests.test_Filters ______________________________

self = <filters.Tests testMethod=test_Filters>

    def test_Filters(self):
        for model in [self.model, self.mvnmodel]:
            x, y = model.sample_path(500)
    
            for filter_, props in [
                (SISR, {'particles': 500}),
                (APF, {'particles': 500}),
                (UKF, {}),
                (SISR, {'particles': 500, 'proposal': Linearized(alpha=None)}),
                (APF, {'particles': 500, 'proposal': Linearized()}),
                (SISR, {'particles': 50, 'proposal': Unscented()})
            ]:
                filt = filter_(model, **props).initialize().longfilter(y)
                filtmeans = filt.result.filter_means.numpy()
    
                # ===== Run Kalman ===== #
                if model is self.model:
                    kf = pykalman.KalmanFilter(transition_matrices=1., observation_matrices=1.)
                else:
                    kf = pykalman.KalmanFilter(transition_matrices=[[0.5, 1 / 3], [0, 1.]], observation_matrices=[1, 2])
    
                filterestimates = kf.filter(y.numpy())
    
                if filtmeans.ndim < 2:
                    filtmeans = filtmeans[:, None]
    
                rel_error = np.median(np.abs((filtmeans - filterestimates[0]) / filterestimates[0]))
    
>               ll = kf.loglikelihood(y.numpy())

filters.py:84: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../anaconda3/envs/pyfilter/lib/python3.6/site-packages/pykalman/standard.py:1474: in loglikelihood
    predicted_state_means, predicted_state_covariances, Z
../../anaconda3/envs/pyfilter/lib/python3.6/site-packages/pykalman/standard.py:170: in _loglikelihoods
    predicted_observation_covariance[np.newaxis, :, :]
../../anaconda3/envs/pyfilter/lib/python3.6/site-packages/pykalman/utils.py:73: in log_multivariate_normal_density
    cv_sol = solve_triangular(cv_chol, (X - mu).T, lower=True).T
../../anaconda3/envs/pyfilter/lib/python3.6/site-packages/scipy/linalg/basic.py:334: in solve_triangular
    b1 = _asarray_validated(b, check_finite=check_finite)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = masked_array(data=[[-0.4739210307598114]],
             mask=[[False]],
       fill_value=1e+20)
check_finite = True, sparse_ok = False, objects_ok = False, mask_ok = False
as_inexact = False

    def _asarray_validated(a, check_finite=True,
                           sparse_ok=False, objects_ok=False, mask_ok=False,
                           as_inexact=False):
        """
        Helper function for SciPy argument validation.
    
        Many SciPy linear algebra functions do support arbitrary array-like
        input arguments. Examples of commonly unsupported inputs include
        matrices containing inf/nan, sparse matrix representations, and
        matrices with complicated elements.
    
        Parameters
        ----------
        a : array_like
            The array-like input.
        check_finite : bool, optional
            Whether to check that the input matrices contain only finite numbers.
            Disabling may give a performance gain, but may result in problems
            (crashes, non-termination) if the inputs do contain infinities or NaNs.
            Default: True
        sparse_ok : bool, optional
            True if scipy sparse matrices are allowed.
        objects_ok : bool, optional
            True if arrays with dype('O') are allowed.
        mask_ok : bool, optional
            True if masked arrays are allowed.
        as_inexact : bool, optional
            True to convert the input array to a np.inexact dtype.
    
        Returns
        -------
        ret : ndarray
            The converted validated array.
    
        """
        if not sparse_ok:
            import scipy.sparse
            if scipy.sparse.issparse(a):
                msg = ('Sparse matrices are not supported by this function. '
                       'Perhaps one of the scipy.sparse.linalg functions '
                       'would work instead.')
                raise ValueError(msg)
        if not mask_ok:
            if np.ma.isMaskedArray(a):
>               raise ValueError('masked arrays are not supported')
E               ValueError: masked arrays are not supported

../../anaconda3/envs/pyfilter/lib/python3.6/site-packages/scipy/_lib/_util.py:261: ValueError
----------------------------- Captured stderr call -----------------------------

SISR:   0%|          | 0/500 [00:00<?, ?it/s]
SISR:  13%|█▎        | 65/500 [00:00<00:00, 649.41it/s]
SISR:  27%|██▋       | 134/500 [00:00<00:00, 661.01it/s]
SISR:  41%|████      | 204/500 [00:00<00:00, 670.90it/s]
SISR:  55%|█████▍    | 274/500 [00:00<00:00, 677.20it/s]
SISR:  69%|██████▊   | 343/500 [00:00<00:00, 679.35it/s]
SISR:  82%|████████▏ | 412/500 [00:00<00:00, 681.09it/s]
SISR:  96%|█████████▋| 482/500 [00:00<00:00, 685.45it/s]
SISR: 100%|██████████| 500/500 [00:00<00:00, 684.51it/s]
=============================== warnings summary ===============================
filters.py::Tests::test_Filters
filters.py::Tests::test_Filters
  /home/aryaman4/anaconda3/envs/pyfilter/lib/python3.6/site-packages/pykalman/utils.py:111: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
    args = inspect.getargspec(obj.__init__)[0]

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============================ slowest test durations ============================
567.45s call     inference.py::MyTestCase::test_Inference
65.77s call     resampling.py::ResamplingTests::test_SystematicMatrix
6.77s call     filters.py::Tests::test_ParallellFiltersAndStability
2.90s call     timeseries.py::Tests::test_TwoFactorSEIRD
2.82s call     timeseries.py::Tests::test_TwoFactorSIRD
2.64s call     timeseries.py::Tests::test_StochasticSIR
2.37s call     timeseries.py::Tests::test_SDE
2.32s call     timeseries.py::Tests::test_Poisson
2.03s call     timeseries.py::Tests::test_TwoFactorFractionalSIR
1.99s call     timeseries.py::Tests::test_ParameterInDistribution
1.87s call     timeseries.py::Tests::test_OneFactorFractionalSIR
1.82s call     filters.py::Tests::test_SDE
1.01s call     filters.py::Tests::test_Filters
0.69s call     filters.py::Tests::test_ParallelUnscented
0.54s call     timeseries.py::Tests::test_MultiDimensional
0.27s call     timeseries.py::Tests::test_OrnsteinUhlenbeck
0.26s call     timeseries.py::Tests::test_OneStepEuler
0.25s call     timeseries.py::Tests::test_BatchedParameter
0.24s call     timeseries.py::Tests::test_LinearBatch
0.01s call     timeseries.py::Tests::test_LinearNoBatch
0.01s call     model.py::Tests::test_Sample
0.01s call     resampling.py::ResamplingTests::test_SystematicVector
0.01s call     utils.py::Tests::test_UnscentedTransform2D

(0.00 durations hidden.  Use -vv to show these durations.)
=========================== short test summary info ============================
FAILED filters.py::Tests::test_Filters - ValueError: masked arrays are not su...
============= 1 failed, 28 passed, 2 warnings in 665.14s (0:11:05) =============
