On 11/17/2015 3:51 PM, fl wrote:
n_iter = 50
sz = (n_iter,) # size of array
x = -0.37727
z = np.random.normal(x,0.1,size=sz)
Q = 1e-5 # process variance
# allocate space for arrays
xhat=np.zeros(sz)
P=np.zeros(sz)
I learn Python now and the above code seems from an experienced author.
The
fl wrote:
>Hi,
>I find the following code snippet, which is useful in my project:
> ...
>correctly. Could you see something useful with variable 'sz'?
So that's example code in "An Introduction to the Kalman Filter" by Greg
Welch and Gary Bishop, and no, that construct was
In fl
writes:
> correctly. Could you see something useful with variable 'sz'?
'sz' is fewer characters than '(n_iter,)', which may make your code easier
to read.
The np.zeros() function explicitly accepts an 'int or
Hi,
I find the following code snippet, which is useful in my project:
n_iter = 50
sz = (n_iter,) # size of array
x = -0.37727
z = np.random.normal(x,0.1,size=sz)
Q = 1e-5 # process variance
# allocate space for arrays
xhat=np.zeros(sz)
P=np.zeros(sz)
I learn Python now and
On Tuesday, November 17, 2015 at 4:03:05 PM UTC-5, John Gordon wrote:
> In fl <@gmail.com>
> writes:
>
> > correctly. Could you see something useful with variable 'sz'?
>
> 'sz' is fewer characters than '(n_iter,)', which may make your
In fl
writes:
> I still don't see the necessity of 'sz'. Thanks,
sz isn't required. You can use (n_iter,) in place of sz.
However, as I posted earlier, sz is shorter so it might make your code
easier to read.
Using
On 17/11/2015 21:27, fl wrote:
On Tuesday, November 17, 2015 at 4:03:05 PM UTC-5, John Gordon wrote:
In fl <@gmail.com>
writes:
correctly. Could you see something useful with variable 'sz'?
'sz' is fewer characters than '(n_iter,)',