Comments (2)
Could be fixed by changing
function squeeze_trail(x::Array)
sz = size(x)
squeezers = Int[]
n = length(sz)
for i=n:-1:1
if sz[i] == 1
push!(squeezers, i)
else
break
end
end
squeeze(x, tuple(squeezers...))
end
to
function squeeze_trail(x::Array)
sz = size(x)
squeezers = Int[]
n = length(sz)
for i=n:-1:1
if sz[i] == 1
push!(squeezers, i)
else
break
end
end
out = squeeze(x, tuple(squeezers...))
length(out) == 1 ? out[1] : out
end
but I think with some design work we can do a better job at finding a type-stable version of funeval
(because as of right now it is very type unstable...)
from compecon.jl.
See type instability by continuing previous example and doing @code_warntype funeval(c, bs, fill(0, 1, 1))
(if you are on julia 0.4dev)
from compecon.jl.
Related Issues (20)
- Type definitions HOT 16
- Golden_Method: Scalar function HOT 2
- ENH: improve type stability HOT 1
- PERF: evalbase for spline could be much more efficient
- DOC: usage of higher degree splines
- idea: experiment with custom sparse type
- status? HOT 2
- order argument HOT 9
- Register HOT 8
- transfer to QuantEcon org?? HOT 6
- Document relationship to BasisMatrices.jl
- testing
- Docs
- v0.7/v1.0 HOT 3
- LoadError: MethodError: no method matching exp HOT 2
- Version compatibility: JLD2 in Julia 1.8.3
- Can we make golden method better in Julia?
- PERF: the `lookup` function in util.jl is the most time consuming part of using for interpolation
- BUG: BasisStructure constructor not working
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 compecon.jl.