Added license text and import from future.

This code did not work for Python 2.x becaus I was not
importing from future. While I was altering all the files
I updated the header to include license information.
This commit is contained in:
Roger Labbe
2015-08-01 08:46:14 -07:00
parent df2b92db79
commit 6bf7552212
18 changed files with 288 additions and 83 deletions

View File

@@ -1,29 +1,32 @@
# -*- coding: utf-8 -*-
"""
Created on Sat May 2 09:46:06 2015
@author: Roger
"""Copyright 2015 Roger R Labbe Jr.
Code supporting the book
Kalman and Bayesian Filters in Python
https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python
This is licensed under an MIT license. See the readme.MD file
for more information.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import math
import matplotlib.pyplot as plt
import numpy as np
from numpy.random import uniform
from numpy.random import randn
import scipy.stats
import matplotlib.pyplot as plt
import random
if __name__ == '__main__':
N = 2000
pf = ParticleFilter(N, 100, 100)
@@ -33,7 +36,7 @@ if __name__ == '__main__':
#pf.create_particles(mean=z, variance=40)
mu0 = np.array([0., 0.])
plot(pf, weights=False)
plt.plot(pf, weights=False)
fig = plt.gcf()