Commit d4d3561a authored by Hakan GIRGIN's avatar Hakan GIRGIN
Browse files

Compatibility with Python3

parent 4df8130f
This diff is collapsed.
......@@ -4,7 +4,7 @@ import sys
from .utils.gaussian_utils import gaussian_conditioning
from .functions import mvn_pdf
from .functions import multi_variate_normal
from .. import pbdlib as pbd
import pbdlib as pbd
class MVN(object):
def __init__(self, mu=None, sigma=None, lmbda=None, lmbda_ns=None, sigma_cv=None, nb_dim=2):
......
......@@ -3,7 +3,6 @@ import matplotlib.pyplot as plt
import scipy as sp
from scipy.stats import multivariate_normal
from .. import pbdlib as pbd
from .functions import *
from matplotlib.path import Path
import matplotlib.patches as patches
......@@ -344,7 +343,7 @@ def plot_mixture_linear_system(model, mode='glob', nb_sub=20, gmm=True, min_alph
# compute responsabilities
l = np.zeros((mesh_data.shape[1], model.nb_states))
for i in range(model.nb_states):
l[:, i] = pbd.multi_variate_normal(mesh_data.T, model.mus_in[i], model.sigmas_in[i])
l[:, i] = multi_variate_normal(mesh_data.T, model.mus_in[i], model.sigmas_in[i])
l += np.log(model.priors)[None]
......@@ -382,7 +381,7 @@ def plot_mixture_linear_system(model, mode='glob', nb_sub=20, gmm=True, min_alph
else:
mu, sigma = (model.mus_in_p[:, 0], model.sigmas_in_p[:, 0])
pbd.plot_gmm(mu, sigma, swap=True, color=statecmap, ax=kwargs.pop('ax0', None), zorder=0)
plot_gmm(mu, sigma, swap=True, color=statecmap, ax=kwargs.pop('ax0', None), zorder=0)
if return_strm:
return statecmap, strm
......
import numpy as np
from .utils.utils import lifted_transfer_matrix
from .. import pbdlib as pbd
import pbdlib as pbd
class LQR(object):
def __init__(self, A=None, B=None, nb_dim=2, dt=0.01, horizon=50):
......
......@@ -8,7 +8,7 @@ from mpl_toolkits.mplot3d import Axes3D
from scipy.special import factorial
from dtw import dtw
from .. import plot as pblt
from ... import pbdlib as pbd
import pbdlib as pbd
plt.style.use('ggplot')
import scipy.sparse as ss
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment