Comments (3)
Could you define current_x_hat as a 1d vector instead ? Then it would be broadcasted to a 2x1 array or 1x2 array depending on the orientation of x
. Would that work ?
To me, one good feature of numpy is that it has 1d
vectors, while in matlab everything is a matrix by default. For the dot operator, it works likewise: provided that the dimensions match you can write dot(A,x)
or dot(x,A)
without caring whether x
is a vector or a linear form.
from quantecon.py.
@albop As you suggest, I dropped conversion to 2d array in the Kalman
class, then the solution script worked as expected without flatten()
. (But I only tried one particular case with R = np.zeros((2, 2))
and x_hat = np.array([0, 0])
.)
http://nbviewer.ipython.org/gist/oyamad/1f9b66fda3679f85f794/kalman_ex3_2.ipynb
from quantecon.py.
Thanks for letting me know about this error. In the end I just corrected the exercise by flattening the vector ex post. I didn't flatten everything inside Kalman because I want the inner workings to be transparent --- this module is more instructive rather than for heavy duty use.
from quantecon.py.
Related Issues (20)
- Unify QuantEcon.py and QuantEcon.jl APIs? HOT 6
- Update Developer Contribution Guide
- Migrate Commit History? HOT 5
- Update badges on README.md
- [Bug]: Error with period of Markov Chain with custom state_values HOT 3
- Bring estimate_mc into top level namespace
- Add function fit_discrete_mc HOT 6
- Register `cartesian_nearest_index` also to `__all__` in gridtools.py? HOT 1
- DOC: Update or remove broken links to QE lectures HOT 2
- Organise a new release `v0.7` with new features HOT 1
- Missing options for tie_breaking in QuantEcon/GameTheory HOT 1
- Error Raised in `qe.random.draw`
- FIX: DOC: Fix build error with Sphinx v7.0.1 HOT 1
- Warning when importing `quantecon` package HOT 2
- License mismatch between repo and JOSS paper HOT 2
- ENH: Example Gallery HOT 3
- Linprog Incorrect Outputs HOT 2
- Add examples to docstring for `linprog_simplex`
- conda releases stalled HOT 3
- Fix numba deprecation notice HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quantecon.py.