Dear Tamas,
Thanks for your suggestion.
After seeing your post, I spent some time trying to know the difference
between
symbols and strings. This stackoverflow post
http://stackoverflow.com/questions/23480722/what-is-a-symbol-in-julia was
helpful. I think both symbols
and strings are fine
Woops, shouldn't have missed this thread.
Either way I just pushed 0.9.1 which turns off all rounding in display.
On Thursday, 20 November 2014 10:59:25 UTC, Ken B wrote:
for reference, here is the issue
https://github.com/one-more-minute/Julia-LT/issues/114
I've been bitten by this one
using PyPlot
using Dates
# Create Data
dt = Millisecond(200)
time = [DateTime(2014,11,20):dt:DateTime(2014,11,24)]
y = fill!(Array(Float64,length(time)),42)
#y = floor(100*rand(length(time))) # Causes error: OverflowError:
Allocated too many blocks
font1 = [fontname=Sans,style=normal]
time =
On Wednesday, November 26, 2014 12:45:09 AM UTC-5, David Smith wrote:
My up-to-date version of Matplotlib won't plot NaNs either.
That's weird; it works fine for me in Matplotlib 1.4.0.
In any case, you can always zero out the NaN values in W via:
W[isnan(W)] = 0
before plotting.
All the good names were taken :)
Pileas wrote:
Is there a specific reason you guys chose this name?
It kinda reminds me Linux Mint where each distro. has a girl's name ...
--
-- Those who don't understand recursion are doomed to repeat it
Fellow Julia enthusiasts,
It seems a quarterly update to Lint.jl carries enough weight without being
overwhelming, so here it is again.
Here are the new abuses that would be caught. Most of them I encountered
them the hard way, so hopefully new users won't random-walk into them.
- A first
You might try something like:
majorformatter = matplotlib[:dates][:DateFormatter](%m/%d)
minorformatter = matplotlib[:dates][:DateFormatter](%H:%M)
majorlocator = matplotlib[:dates][:DayLocator](interval=1)
minorlocator = matplotlib[:dates][:HourLocator](byhour=(8, 16))
I'm implementing an inference algorithm and am running into memory
allocation issues that are slowing it down. I created a minimal example
that resembles my algorithm and see that the problem persists.
The issue is that Julia is allocating a lot of extra memory when adding
matrices together.
a search of the julia-users list for the string simplex yields nine posts
...
since an attribute of benchmarking is speed/timing, this post stood out:
https://groups.google.com/forum/?fromgroups=#!searchin/julia-users/simplex|sort:date/julia-users/QCPHX63r0oQ/mheoSJqD96YJ
within that
OK thanks John, I ended up doing a bit differently but it works fine. Sorry
to keep asking, but now I have another problem I can't seem to wrap my head
around: consider
my_type_collection = Vector{MyType}
my_type_collection[1] = MyType(a,b,c)
returns: `setindex!` has no method matching
Hi Tony,
I've only been using Lint for two days, so I might be doing it wrong, but
I'm getting a lot of false positives about values I've declared, but not
used - upon closer inspection of my code, they are almost always used,
sometimes within loops, sometimes in if/else branches, sometimes as
Vector{MyType} is a type, not a value. Did you mean Array(MyType, 1)?
— John
On Nov 26, 2014, at 8:38 AM, Robert Gates robert.ga...@gmail.com wrote:
OK thanks John, I ended up doing a bit differently but it works fine. Sorry
to keep asking, but now I have another problem I can't seem to
Another thing: Consider the following example
X1 = zeros(100, 100)
X2 = Array(Float64, (100, 100))
X1[1, 1]
X2[1, 1]
In this piece of code, I will get an error saying X2[1, 1] has more
indices than dimensions, even though it hasn't. In light of the recent
discussion on this list about the
Ah yes, array related type checks is a major issue. See
https://github.com/tonyhffong/Lint.jl/issues/27
Post your issues there and we should be able to knock them off. It's not
difficult, just need to know where the priorities are.
Tony
On Wednesday, November 26, 2014 11:49:58 PM UTC+7, Nils
Have you considered the example scsd8.mat?
Em quarta-feira, 26 de novembro de 2014 14h39min14s UTC-2, Pileas escreveu:
Result with tic() toc() at the very beginning and at the very end:
elapsed time: 0.025719973 seconds
Τη Τετάρτη, 26 Νοεμβρίου 2014 11:06:26 π.μ. UTC-5, ο χρήστης Emerson
On Wednesday, November 26, 2014 11:41:09 PM UTC+7, Nils Gudat wrote:
An example:
function f{T:Float64}(x1::T, x2::T, x3::Array) will give me Error:
Float64 is a leaf type. As a type constraint it makes no sense in
T:Float64. I thought this was a way of efficiently expressing that both
x1
I'm not sure if this is the problem, but changing the type of a variable in
a function body causes problems for type inference. For that reason, the
first two lines of this code may cause performance issue if you call this
with b and c as matrices. A more Julian idiom for this is to do something
Le mercredi 26 novembre 2014 à 07:55 -0800, Colin Lea a écrit :
I'm implementing an inference algorithm and am running into memory
allocation issues that are slowing it down. I created a minimal
example that resembles my algorithm and see that the problem persists.
The issue is that Julia
Humm, It's useful but I guess that the problem is something in loop while...
Em quarta-feira, 26 de novembro de 2014 15h05min03s UTC-2, Stefan Karpinski
escreveu:
I'm not sure if this is the problem, but changing the type of a variable
in a function body causes problems for type inference.
Hello again,
I worked hard on NamedArrays.jl to solve the problems indicated below:
On Monday, November 10, 2014 1:43:57 AM UTC+1, Dahua Lin wrote:
NamedArrays.jl generally goes along this way. However, it remains limited
in two aspects:
1. Some fields in NamedArrays are not declared of
Le mercredi 26 novembre 2014 à 09:26 -0800, Emerson Vitor Castelani a
écrit :
Humm, It's useful but I guess that the problem is something in loop
while...
If I were you I'd have a look at where time is spent are where
allocations are happening, and try to improve this by writing explicit
loops
Nice job using track-allocation to figure out where the problem is.
If you really don't want allocation, then you should investigate Devec.jl or
InPlaceOps.jl, or write out these steps using loops to access each element of
those matrices.
--Tim
On Wednesday, November 26, 2014 07:55:59 AM
It does not happen in my machine either.
Τη Τετάρτη, 19 Νοεμβρίου 2014 2:47:20 μ.μ. UTC-5, ο χρήστης Intrinsic Audio
έγραψε:
I've found an interesting issue in Julia that, though it seems trivial in
the application I've given, is really messing up my code and my ability to
guarantee its
Stefan's point is more relevant than you realize; if the type of the variable
is uncertain, the loop will be very slow. You can make that resize operation a
separate function, from which you call your main routine.
--Tim
On Wednesday, November 26, 2014 09:26:35 AM Emerson Vitor Castelani
Consider the following simple example:
using HDF5, JLD
addprocs(2)
# create and save the shared array
a = SharedArray(Int64, 100)
save(example.jld, a, a)
# clear the shared array...
a = nothing
# load what we saved...
a = load(example.jld)[a]
# try to use it...
@parallel for i in 1:length(a)
Thanks to you both! However, there is still another odd issue.
These two functions should be the same, but take very different amounts of
time/memory. Both 'T' and 'n_classes' are both of type Int64.
@time (
for t = 2:T
for n = 1:n_classes
for j = 1:n_classes
Are these functions? Or are you timing expressions in the global scope?
-- John
On Nov 26, 2014, at 10:28 AM, Colin Lea colin...@gmail.com wrote:
Thanks to you both! However, there is still another odd issue.
These two functions should be the same, but take very different amounts of
That was in global scope. Should that matter?
On Nov 26, 2014, at 1:30 PM, John Myles White johnmyleswh...@gmail.com
wrote:
?
Yes, the global scope is scarcely optimized and doesn't provide useful
information about performance.
-- John
On Nov 26, 2014, at 10:33 AM, Colin Lea colin...@gmail.com wrote:
That was in global scope. Should that matter?
On Nov 26, 2014, at 1:30 PM, John Myles White
One more issue: The example above can be fixed by reassigning `a` to a new
shared array. But in my case this won't work since I have this array within
a wrapper type... seems like another semi related issue?
Ah, ok. Thanks! I ran those as functions and got similar timings.
On Nov 26, 2014, at 1:35 PM, John Myles White johnmyleswh...@gmail.com
wrote:
Yes, the global scope is scarcely optimized and doesn't provide useful
information about performance.
-- John
On Nov 26, 2014, at 10:33
It turns out that doesn't actually matter but there are other unrelated
ill-typed variables in the code:
Xb, o, y, r, e, Nj, ind, q, t
I haven't determined why this is happening, but something is ill-typed here.
On Wed, Nov 26, 2014 at 1:20 PM, Tim Holy tim.h...@gmail.com wrote:
Stefan's
I wonder if \ might be type unstable.
On Wed, Nov 26, 2014 at 2:49 PM, Stefan Karpinski ste...@karpinski.org
wrote:
It turns out that doesn't actually matter but there are other unrelated
ill-typed variables in the code:
Xb, o, y, r, e, Nj, ind, q, t
I haven't determined why this is
Suppose I have a type called MyType that has one floating point field x.
When constructed, if the value provided for x is greater than, let's say,
5, it has pi subtracted from it. For example,
a = MyType(4) # x = 4.0
b = MyType(-11) # x = 11.0
c = MyType(10) # x = 6.8584
d = MyType(-1.443) #
How about
immutable MyType{T:Real}
x::T
v::Vector{T}
s::String
function MyType(x, v, s)
x = subtractpi(x)
v = map(subtractpi, v)
new(x, v, s)
end
end
MyType{T1:Real, T2:Real}(x::T1, v::Vector{T2}, s::String) =
(T=promote_type(T1,T2); MyType{T}(x, v,
Thanks for your quick response! I have a couple questions/concerns about
your implementation:
- MyType(1, [2, 3], xyz) fails requirement #2
- MyType(1, [2, 10], xyz) throws InexactError()
- Does the declaration s::String cause the ambiguities described in the FAQ
here
Defining an RL-agent environment in RL-Glue API is a straightforward task.
Apart from (de)initialization calls, an environment respond for the agent
action must me defined. This respond should have an appropriate reward for
the agent (There are two separate placeholders for integer and real
Thanks for your quick response! I have a couple questions/concerns about
your implementation:
- MyType(1, [2, 3], xyz) fails requirement #2
MyType{T1:Real, T2:Real}(x::T1, v::Vector{T2}, s::String) =
(T=promote_type(T1,T2,Float64); MyType{T}(x, v, s))
If you want to keep Float16, etc this
it should be noted that there's nothing inherently wrong or bad about
using non-concrete type specifications in type declarations. it does,
however, limit certain optimizations that might provide performance
benefits, and may be especially important for native numerical types.
On Wed Nov 26 2014
I found out that the code works when I use IJulia, but not when I run the
command: julia file.jl.
This is weird indeed ...
Τη Τετάρτη, 26 Νοεμβρίου 2014 9:05:32 π.μ. UTC-5, ο χρήστης Steven G.
Johnson έγραψε:
On Wednesday, November 26, 2014 12:45:09 AM UTC-5, David Smith wrote:
My
I would like to get an invite code if at all possible.
Thanks!
Zenna
On Saturday, November 15, 2014 4:07:51 AM UTC-5, Viral Shah wrote:
Yes, we certainly want to add GitHub to the mix.
-viral
On 14-Nov-2014, at 7:16 pm, Daniel Carrera dcar...@gmail.com
javascript: wrote:
Pileas,
Given that I've still been unable to install IJulia, that's very helpful,
thanks.
On Tue, Nov 25, 2014 at 6:29 PM, Pileas phoebus.apollo...@gmail.com wrote:
I have to suggest a very good editor that supports Julia and it is
called Atom. It becomes better each day:
Give it a try if
I have the following function defined to check whether a record exists in a
Mongodb database (thanks a million for PyCall, which make it easy to use
pymongo
to interact with mongodb in julia).
function doesrecexist(collectn::PyObject, rec::Dict{ASCIIString,Any})
# checks if record
On Wednesday, November 26, 2014 6:01:56 PM UTC-6, Test This wrote:
I have the following function defined to check whether a record exists in
a Mongodb database (thanks a million for PyCall, which make it easy to use
pymongo
to interact with mongodb in julia).
function
Patrick, thank you for your response and the link. I will need to read it
more carefully and try to understand as it since it deals with concepts I
am not familiar with. However, wouldn't the solution you proposed restrict
all values of the rec Dict to the same type in any given call. Am I
I ran into similar mental difficulty regarding whether type Any is a
superset of any other types. I did not find anything to read, but
simply accepted the fact through painstaking experiments.
I think the word Any here is confusing. The English definition of it
means that it ought to
All types do have Any as a parent.
It is clear that many people are confused about what covariance, contravariance
and invariance mean in computer science. As such, I very strongly encourage
everyone who isn't sure that they understand Julia's type system to read
through the wikipedia article
It is demonstrated in the manual at
http://docs.julialang.org/en/release-0.3/manual/types/#parametric-composite-types
that parametric types do not have any relationship even if their parameter
types have some relationship. Perhaps it would be better emphasise that
and to explain it simply
I figured out an approach that works for animation, thanks to Jiahao Chen,
using 2 IJulia inputs:
# In[1]
using ApproxFun,Gadfly,Reactive
x=Input(Fun(exp))
lift(ApproxFun.plot, x)
# In[2]
for k=1:10
push!(x,Fun(x-cos(k*x)))
end
On Tuesday, November 4, 2014 2:46:44 AM UTC-6, Sheehan
Did a benchmark for calculating shadowing of a triangulated surface mesh in
julia and cython.
It is basically a loop over all surface elements and checks if any other of
the surface elements intersect
with the line of sight pointing towards a light source. (see pic below,
light source on the
Thanks, now I understand it.
The problem I had was this, which I imagine to exist with many other
non-computer scientists new to Julia.
This topic is discussed under the parametric type section of the manual,
and since I had not attempted to use parametric types (the things with
the
There is one thing is see as a potential.
The outer loop *i* is incrementing the first index, and Julia stores things
in column-major order, so any speed gain from CPU cache is potentially lost
since you using elements that are not contiguous in the inner loops.
if you are not averse to trying IJulia in your browser, then have a look at
this post ...
https://groups.google.com/forum/#!searchin/julia-users/tmpnb|sort:relevance/julia-users/zEp8pKkEYHk/qY7tPqrOp9gJ
there are other ways to work with IJulia on kernels hosted elsewhere; let
me know
if
Hi Abram,
If all else fails, you have still this alternative
http://nbviewer.ipython.org/github/winpython/winpython_afterdoc/blob/master/examples/installing_julia_and_ijulia.ipynb
On Thursday, November 27, 2014 6:57:41 AM UTC+1, cdm wrote:
if you are not averse to trying IJulia in your
The explanation that made me stop suggesting that `Sometype{T1} :
Sometype{T2} if T1:T2` was the following function:
function foo( a::Array{Any, 1})
# I can now get objects from the array, and they will be subtypes of Any
b = a[1]
# And I can insert Any object into the array
55 matches
Mail list logo