Re: [julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Júlio Hoffimann
Thank you Isaiah, I'll follow your tip and use Hwloc.jl -Júlio

Re: [julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Júlio Hoffimann
My question is, it returns the same concept in all OS? Is it physical number of cores? -Júlio

[julia-users] Sys.CPU_CORES

2016-11-02 Thread Júlio Hoffimann
Hi, Sys.CPU_CORES returns the number of physical cores or processing units? Is it portable across different OS? -Júlio

Re: [julia-users] Re: Sparse arrays in Julia

2016-10-28 Thread Júlio Hoffimann
Thank you Kristoffer, good to know about the package :) -Júlio

[julia-users] Re: Sparse arrays in Julia

2016-10-27 Thread Júlio Hoffimann
Actually, I don't think it makes very much sense, one could use a dictionary of tuples instead. Sparse 2D exist for a reason: efficient matrix multiplication, etc. Disregard this email. -Júlio Em quinta-feira, 27 de outubro de 2016 17:07:01 UTC-7, Júlio Hoffimann escreveu: > > He

[julia-users] Sparse arrays in Julia

2016-10-27 Thread Júlio Hoffimann
Hello, Is it possible to create a multidimensional sparse array in Julia? sparse() works for matrices, I wonder if someone can extend it to multidimensional arrays. Where should I open a feature request? -Júlio

[julia-users] Dropping all explicit Any type annotation in Julia >= v0.5

2016-10-20 Thread Júlio Hoffimann
Hi, In Julia v0.4 I had to write Any[eye(3),eye(3)] in order to get a list of arrays. In Julia v0.5, the syntax changed and now [eye(3),eye(3)] is what I need. Could you please confirm I can drop all occurrences of the Any type annotation in these cases without side effects other than changing

Re: [julia-users] Re: Uniqueness check in PriorityQueue

2016-10-17 Thread Júlio Hoffimann
Thank you Steven, I fixed the issue by storing other objects in the PriorityQueue. -Júlio 2016-10-17 14:27 GMT-07:00 Steven G. Johnson : > Make a copy before you mutate it. In general, it is not safe to mutate > the keys of a dictionary, which is what you are doing. >

[julia-users] Uniqueness check in PriorityQueue

2016-10-17 Thread Júlio Hoffimann
Hi, Consider the following snippet: using LightGraphs using Base.Collections pq = PriorityQueue(DiGraph, Int) G = DiGraph(3) add_edge!(G, 1,2) enqueue!(pq, G, 1) # reverse edge rem_edge!(G, 1,2) add_edge!(G, 2,1) enqueue!(pq, G, 2) It produces this error: ERROR: ArgumentError: PriorityQueu

Re: [julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Júlio Hoffimann
Ok, I am not switching to FactCheck then, didn't knew it is being deprecated in a sense. Thank you, -Júlio 2016-10-14 18:05 GMT-07:00 Yichao Yu : > On Oct 14, 2016 8:52 PM, "Júlio Hoffimann" > wrote: > > > > Oh really? I'm not following it closely. Please

Re: [julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Júlio Hoffimann
Oh really? I'm not following it closely. Please let me know why that is the case, I was planning to switch to FactCheck. -Júlio

[julia-users] FactCheck.jl bundled with Julia?

2016-10-14 Thread Júlio Hoffimann
Hi, It seems that FactCheck.jl has become the defacto standard for writing tests in Julia packages. Wouldn't it be a good idea to have it bundled with Julia? Any reason to keep the current test framework? -Júlio

RE: [julia-users] Filtering DataFrame with a function

2016-10-13 Thread Júlio Hoffimann
That is really cool David, I fully agree with this modularization :) -Júlio

Re: [julia-users] Filtering DataFrame with a function

2016-10-13 Thread Júlio Hoffimann
what you're looking for? If not, can you give an example of what > you want to do? > > Best, > > Alex > > On Wednesday, October 12, 2016 at 10:20:52 PM UTC-7, Júlio Hoffimann wrote: >> >> Thank you very Much David, these queries you showed are really nice. I >

Re: [julia-users] Filtering DataFrame with a function

2016-10-12 Thread Júlio Hoffimann
I that LINQ has. I'm still figuring out how to > surface something like @count in the query expression syntax, but for now > one can use it via this macro. > > All of this is on master right now, so you would have to do > Pkg.checkout("Query") to get these macros. > &g

Re: [julia-users] Filtering DataFrame with a function

2016-10-12 Thread Júlio Hoffimann
y of a > NamedTuple type (you can also materialize it into a whole bunch of other > data structures, take a look at the documentation). > > > > Let me know if this works, or if you have any other feedback on Query.jl, > I’m much in need of some user feedback for the package at t

[julia-users] Filtering DataFrame with a function

2016-10-12 Thread Júlio Hoffimann
Hi, I have a DataFrame for which I want to filter rows that match a given criteria. I don't have the number of columns beforehand, so I cannot explicitly list the criteria with the :symbol syntax or write down a fixed number of indices. Is there any way to filter with a lambda expression? Or e

Re: [julia-users] Re: Priority queue - peek versus dequeue!

2016-09-14 Thread Júlio Hoffimann
Thank you, I'll open an issue. -Júlio

[julia-users] Priority queue - peek versus dequeue!

2016-09-13 Thread Júlio Hoffimann
Hi, Could you explain why "peek" returns the pair (key,value) whereas "dequeue!" only returns the key? using Base.Collections pq = PriorityQueue() enqueue!(pq, key, value) key, value = Collections.peek(pq) key = dequeue!(pq) I wanted to have a single line in which I retrieve both (key,value) an

Re: [julia-users] Re: Return type of eye()

2016-08-30 Thread Júlio Hoffimann
I don't think there is anything like pushing the language to computer scientists, it's the exact opposite, making it seamlessly fast without forcing the user to manipulate types. Again, you write B = I*A and get B = copy(A) performance. That is the original proposal. Most of us follow the same dev

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
Sorry for the combative tone Christoph. I thought it was necessary in order to not deviate too much from the core issue. Thank you for your participation and for raising your personal opinions about the topic. -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
So maybe add a dimension or create a type that makes more sense for the application? -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
Why is it so important to have all this machinery around linspace and eye? collect is more than enough in my opinion and all the proposals for keeping both versions and pass a type as a parameter are diluting the main issue here: the need for a smart mechanism that handles things efficiently and se

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
Yes, they are all personal preference. None of the reasons you mentioned is strong for the existence of both. Furthermore, I'm glad Julia doesn't need to be backward compatible with MATLAB. This is the exact reason I quited GNU Octave, no point in repeating mistakes. -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
Christoph, Can you elaborate on why you want to have both? Also, why you wanted the non-lazy linspace? If I understood correctly, you're talking about returning a array with allocated memory versus a range object, isn't the latter always preferred? I don't understand. -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
Tim, Would it make sense to have "I" as an object that acts like UniformScaling and doesn't require any memory allocation, but is only transformed into sparse matrix via the [] operator? Maybe something similar to arrays -> subarrays? -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
Why would one want dense identity matrix?

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
It is more than sparse, it acts as scalar at first, maybe the operator [] modifies the type to sparse? -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
Andreas, is there a way to get the best of both worlds? Let's say eye() is deprecated, can we somehow set off-diagonal terms in a type that is smart like UniformScaling and supports indexing with operator []? -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
I'd like to understand the existence of eye() in Julia, it is still not clear to me. Is it because one wants type stability when updating a matrix iteratively? Is this possibly a limitation from the design of the language? -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
I still think that having a "global variable" named "I" is not robust. I've read so many scripts in matlab that do I = eye(n). This approach is not gonna work. -Júlio

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Júlio Hoffimann
Hi Andreas, As a user I would like to write B = eye(1) * A and have the performance of B = A 90% of the users won't be aware of this 1-character variable "I" defined in Base nor use it. Also, I can guarantee that "I" is much easier to overwrite than a well known function name. -Júlio

[julia-users] Return type of eye()

2016-08-28 Thread Júlio Hoffimann
Hi, I wanna revive a discussion around the return type of eye(). Currently this function always returns a dense matrix, which is not desired considering that the identity acts as a simple scalar in every single place it is used. By exploiting the type system, one would ideally write algorithms

[julia-users] CLFFT on 2D/3D arrays

2016-04-11 Thread Júlio Hoffimann
Hello, I am trying to implement the classical tiled convolution with OpenCL in one of my Julia packages to get some speedup: https://github.com/JuliaGPU/CLFFT.jl/issues/5 If you have experience in CLFFT.jl, I appreciate your feedback. Sincerely, Júlio

Re: [julia-users] Fancy integer literals

2016-04-10 Thread Júlio Hoffimann
Interesting, thank you Yichao! -Júlio

[julia-users] Fancy integer literals

2016-04-10 Thread Júlio Hoffimann
Today I saw for the first time a code written like: a = 50_000 What is the name of this feature in the docs? -Júlio

Re: [julia-users] Julia way of filling columns of a matrix

2016-01-18 Thread Júlio Hoffimann
till points to the original > data, so no copying is done. > > Cheers, >Kevin > > On Mon, Jan 18, 2016 at 12:48 PM, Júlio Hoffimann < > julio.hoffim...@gmail.com> wrote: > >> Yes, I will rely on the classical hcat() approach... >> >> A = [] &

Re: [julia-users] Julia way of filling columns of a matrix

2016-01-18 Thread Júlio Hoffimann
Yes, I will rely on the classical hcat() approach... A = [] for i=1:n push!(A, [1,2,3]) end A = hcat(A...) Thank you. 2016-01-18 11:42 GMT-08:00 Júlio Hoffimann : > Hi, > > Suppose I want to fill the columns of a matrix which size I don't know > beforehand: > > A =

[julia-users] Julia way of filling columns of a matrix

2016-01-18 Thread Júlio Hoffimann
Hi, Suppose I want to fill the columns of a matrix which size I don't know beforehand: A = zeros(3,0) for i=1:n A = [A [1,2,3]] end Is there a memory efficient way of doing that in Julia? I understand that the above syntax is allocating 3*i entries at iteration i which gives 3*(1+2+...+n) =

Re: [julia-users] Understanding memory allocation output

2015-12-10 Thread Júlio Hoffimann
Maybe that is the reason Tim, I'm on latest master 0.5-dev-... -Júlio

Re: [julia-users] Understanding memory allocation output

2015-12-10 Thread Júlio Hoffimann
Thank you everyone, I will delay this optimization for now. Will keep an eye on the issue on GitHub. -Júlio 2015-12-10 13:47 GMT-08:00 Júlio Hoffimann : > I tried both sub() and slice(), they make it worst: > > - function baz() > 8000768 a = ones(100,100,100) > 8000

Re: [julia-users] Understanding memory allocation output

2015-12-10 Thread Júlio Hoffimann
() - baz() - -Júlio 2015-12-10 13:45 GMT-08:00 Tim Holy : > On Thursday, December 10, 2015 12:49:42 PM Júlio Hoffimann wrote: > > Why the assignment is allocating memory? > > b[1:50,1:50,1:50] creates a new array. Try sub(b, 1:50, 1:50, 1:50). > > --Tim >

Re: [julia-users] Understanding memory allocation output

2015-12-10 Thread Júlio Hoffimann
It makes more sense now: - function baz() 8000768 a = ones(100,100,100) 8000544 b = zeros(100,100,100) - 62981056 a[1:50,1:50,1:50] = b[1:50,1:50,1:50] - end - - baz() - Profile.clear_malloc_data() - baz() - Some extra byt

Re: [julia-users] Understanding memory allocation output

2015-12-10 Thread Júlio Hoffimann
I just run the script with: julia --track-allocation=user --inline=no baz.jl Do I need to warm up something first? -Júlio 2015-12-10 13:10 GMT-08:00 Kristoffer Carlsson : > I meant regarding the negative allocation number. Regarding the different > memories, did you compile, clear memory cache

Re: [julia-users] Understanding memory allocation output

2015-12-10 Thread Júlio Hoffimann
different amount of memory even though they have the same dimensions? Why the assignment is allocating memory? -Júlio 2015-12-10 12:31 GMT-08:00 Júlio Hoffimann : > Kristoffer, > > You mean the issue as a whole or the two questions I've asked? > > -Júlio > > 2015-12-10

Re: [julia-users] Understanding memory allocation output

2015-12-10 Thread Júlio Hoffimann
Kristoffer, You mean the issue as a whole or the two questions I've asked? -Júlio 2015-12-10 12:28 GMT-08:00 Kristoffer Carlsson : > Overflow of allocation counter

Re: [julia-users] Understanding memory allocation output

2015-12-10 Thread Júlio Hoffimann
line-numbering problem. > Does this still happen with --inline=no? Are you using macros elsewhere? > > Assuming this is a julia bug, trimming it down to a minimal example would > probably help isolate the problem. I'm afraid I don't have any other ideas. > > --Tim >

Re: [julia-users] Understanding memory allocation output

2015-12-09 Thread Júlio Hoffimann
Hi Tim, I recompiled Julia, reinstalled all the packages and the *.mem file is still showing those strange counts. Any idea? -Júlio 2015-12-09 8:44 GMT-08:00 Júlio Hoffimann : > Thanks Tim, I'll double check it. > > -Júlio >

Re: [julia-users] Understanding memory allocation output

2015-12-09 Thread Júlio Hoffimann
Thanks Tim, I'll double check it. -Júlio

[julia-users] Understanding memory allocation output

2015-12-08 Thread Júlio Hoffimann
Hi, I don't understand why some lines like 6, 16, 29, 33, 186 are allocating memory in the attached example. Can someone explain? -Júlio iqsim.jl.mem Description: Binary data

Re: [julia-users] Re: `findmin` with arbitrary comparison operator?

2015-12-06 Thread Júlio Hoffimann
> >>> Could a workable solution be to define a function that maps a tuple to a >>> real number instead of a comparison function and do >>> 'findmin(map(score_func, my_tuples))' ? >>> >>> On Tuesday, December 1, 2015 at 12:20:53 PM UTC-5, Jú

Re: [julia-users] Re: `findmin` with arbitrary comparison operator?

2015-12-01 Thread Júlio Hoffimann
The issue on GitHub: https://github.com/JuliaLang/julia/issues/14216 Thanks, -Júlio 2015-12-01 8:57 GMT-08:00 Dan : > suggestion: call the named argument `lt` to match the argument of `sort`. > > > On Tuesday, December 1, 2015 at 6:23:07 PM UTC+2, Júlio Hoffimann wrote: &

Re: [julia-users] Re: `findmin` with arbitrary comparison operator?

2015-12-01 Thread Júlio Hoffimann
Hi Erik, What I meant was a derived type from Julia's Tuple type. Though I agree with you that this may be too much of an overhead for such a simple task. I'll open an issue on GitHub to ask if others are ok with an additional predicate option a la C++: findmin(array, pred=<) If they are all po

Re: [julia-users] float(X) vs. map(Float64, X)

2015-11-29 Thread Júlio Hoffimann
er})) > map(f, A::AbstractArray{T,N}) at abstractarray.jl:1305 > > and: > > function map(f, A::AbstractArray) > if isempty(A) > return isa(f,Type) ? similar(A,f) : similar(A) > end > first = f(A[1]) > dest = similar(A, typeof(first)) >

Re: [julia-users] float(X) vs. map(Float64, X)

2015-11-29 Thread Júlio Hoffimann
Hi David, Yes, I got confused for a second. Yichao clarified on the GitHub issue. I still don't know why these two functions are causing different behavior in my package though. -Júlio 2015-11-29 18:44 GMT-08:00 David P. Sanders : > NaNs are not equal to each other.

Re: [julia-users] float(X) vs. map(Float64, X)

2015-11-29 Thread Júlio Hoffimann
It has something to do with NaN representation: # 64bits a = ones(10,10) a[:,5] = NaN b = float(a) c = map(Float64, a) b == c # this should be true, but it's not I'll open an issue on GitHub. -Júlio 2015-11-29 15:14 GMT-08:00 Júlio Hoffimann : > Hi Yichao, > > Wha

Re: [julia-users] float(X) vs. map(Float64, X)

2015-11-29 Thread Júlio Hoffimann
Hi Yichao, What is the difference? -Júlio 2015-11-29 15:09 GMT-08:00 Yichao Yu : > On Sun, Nov 29, 2015 at 6:02 PM, Júlio Hoffimann > wrote: > > Hi, > > > > Could you please confirm Xf = float(X) is a shortcut for Xf = > map(Float64, > > X) on a 64bits

[julia-users] Re: `findmin` with arbitrary comparison operator?

2015-11-29 Thread Júlio Hoffimann
Hi Erik, All you need to do is specialize the < operator for your tuple type. Please check the definition of findmin by running: @edit findmin([1,2,3]) You'll see the implementation is quite trivial. Let us know if you weren't able to make it work. Best, -Júlio Em domingo, 29 de novembro de

[julia-users] float(X) vs. map(Float64, X)

2015-11-29 Thread Júlio Hoffimann
Hi, Could you please confirm Xf = float(X) is a shortcut for Xf = map(Float64, X) on a 64bits machine? For some reason the tests in my package fail when I replace one by the other. -Júlio

Re: [julia-users] julia --track-allocation option is not generating *.mem file

2015-11-27 Thread Júlio Hoffimann
I opened an issue: https://github.com/JuliaLang/julia/issues/14172 Thanks, -Júlio 2015-11-27 9:46 GMT-08:00 Júlio Hoffimann : > Hi, > > The --track-allocation option on latest (master) Julia is not generating > the *.mem file as described in the docs. > > $ julia --track-allo

[julia-users] julia --track-allocation option is not generating *.mem file

2015-11-27 Thread Júlio Hoffimann
Hi, The --track-allocation option on latest (master) Julia is not generating the *.mem file as described in the docs. $ julia --track-allocation=user foo.jl Anything changed recently? How to profile memory allocations nowadays? -Júlio

Re: [julia-users] Re: String argument for @sprintf

2015-11-18 Thread Júlio Hoffimann
julia-why-is-printf-a-macro-instead-of-a-function > > https://groups.google.com/forum/#!topic/julia-users/7Sn5yys0UJE > > etc > > > On Wednesday, November 18, 2015 at 6:38:09 PM UTC+1, Júlio Hoffimann wrote: >> >> Hi, >> >> Could you please explain why this w

[julia-users] String argument for @sprintf

2015-11-18 Thread Júlio Hoffimann
Hi, Could you please explain why this works: @sprintf("foo%02i", 3) but this doesn't: s = string("foo","%02i") @sprintf(s, 3) How is a formatted string different than an usual string? -Júlio

Re: [julia-users] Re: Hausdorff distance

2015-10-26 Thread Júlio Hoffimann
Thanks, will take a look. -Júlio

Re: [julia-users] Re: Hausdorff distance

2015-10-26 Thread Júlio Hoffimann
Hi Andrew, Could you please point to a good paper? This naive implementation I showed is working surprisingly well for me though. -Júlio

Re: [julia-users] Hausdorff distance

2015-10-24 Thread Júlio Hoffimann
I'll open an issue for it, thanks. -Júlio 2015-10-23 15:28 GMT-07:00 Júlio Hoffimann : > Hi, > > I want to make the Hausdorff distance ( > https://en.wikipedia.org/wiki/Hausdorff_distance) available in Julia, is > the Distances.jl package a good fit or I should create a sep

[julia-users] Hausdorff distance

2015-10-23 Thread Júlio Hoffimann
Hi, I want to make the Hausdorff distance (https://en.wikipedia.org/wiki/Hausdorff_distance) available in Julia, is the Distances.jl package a good fit or I should create a separate package just for this distance between point sets? I can think of a very simple (naive) implementation: using D

Re: [julia-users] Re: Old Julia profiles in Jupyter session

2015-10-05 Thread Júlio Hoffimann
Thank you Steven, problem solved. Found the kernels directory and deleted the old versions. -Júlio 2015-10-05 16:13 GMT-07:00 Steven G. Johnson : > > > On Monday, October 5, 2015 at 5:19:51 PM UTC-4, Júlio Hoffimann wrote: >> >> Whenever I update Julia I see a new profile

Re: [julia-users] Re: Old Julia profiles in Jupyter session

2015-10-05 Thread Júlio Hoffimann
Hi David, what files exactly? I tried to delete the profiles, but I don't see them under .ipython nor .jupyter -Júlio

[julia-users] Old Julia profiles in Jupyter session

2015-10-05 Thread Júlio Hoffimann
Hi, Whenever I update Julia I see a new profile in my Jupyter session. How to delete all these old versions in the attached screenshot? -Júlio

[julia-users] Travis build failing

2015-10-02 Thread Júlio Hoffimann
Hi, All my packages are failing the build on Travis/Linux even though I didn't touch the code recently. The build on Travis/Mac is working. For instance: https://github.com/juliohm/GeoStatsImages.jl Could you please confirm the error is in the Travis/Julia side? -Júlio

Re: [julia-users] Package badge URLs for nightly build

2015-09-30 Thread Júlio Hoffimann
I'll proceed and update the URLs. Thanks, -Júlio

Re: [julia-users] Package badge URLs for nightly build

2015-09-30 Thread Júlio Hoffimann
Anyone has this info? -Júlio 2015-09-29 10:56 GMT-07:00 Júlio Hoffimann : > Hi, > > Could you please confirm the badge URLs for nightly builds are obsolete > and that I have to use a specific Julia version now? > https://github.com/juliohm/ImageQuilting.jl/blob/master/README.md > > -Júlio >

[julia-users] Package badge URLs for nightly build

2015-09-29 Thread Júlio Hoffimann
Hi, Could you please confirm the badge URLs for nightly builds are obsolete and that I have to use a specific Julia version now? https://github.com/juliohm/ImageQuilting.jl/blob/master/README.md -Júlio

Re: [julia-users] Embarrassingly parallel workload

2015-08-19 Thread Júlio Hoffimann
Hi Sebastian, thanks for sharing your experience in parallelizing Julia code. I used OpenMP in the past too, it was very convenient in my C++ codebase. I remember of an initiative OpenACC that was trying to bring OpenMP and GPU accelerators together, I don't know the current status of it. It may be

Re: [julia-users] Embarrassingly parallel workload

2015-08-19 Thread Júlio Hoffimann
Hi Ismael, MPI is distributed memory, I'm trying to use all the cores in my single workstation with shared memory instead. Thanks for the link anyways. -Júlio

Re: [julia-users] Embarrassingly parallel workload

2015-08-19 Thread Júlio Hoffimann
Hi Kristoffer, sorry for the delay and thanks for the code. What I want to do is very simple: I have an expensive loop for i=1:N such that each iteration is independent and produces a large array of size M. The result of this loop is a matrix of size MxN. I have many CPU cores at my disposal and w

Re: [julia-users] Embarrassingly parallel workload

2015-08-10 Thread Júlio Hoffimann
What am I doing wrong in the following code? function foo(N; parallel=false) if parallel && nprocs() < CPU_CORES addprocs(CPU_CORES - nprocs()) end result = SharedArray(Float64, 9, N) @parallel for i=1:N sleep(1) result[:,i] = rand(3,3)[:] end result end If I call foo(60

Re: [julia-users] Embarrassingly parallel workload

2015-08-09 Thread Júlio Hoffimann
Consider the following simplified example. There is an algorithm implemented as a function foo(N). This algorithm repeats the same recipe N times in a loop to fill in an array of arrays: function foo(N) # bunch of auxiliary variables goes here # ... result = [] for i=1:N # complicated

Re: [julia-users] Embarrassingly parallel workload

2015-08-09 Thread Júlio Hoffimann
Thank you Tim, will check it carefully. -Júlio

[julia-users] Embarrassingly parallel workload

2015-08-09 Thread Júlio Hoffimann
Hi, Suppose I have a complicated but embarrassingly parallel loop, namely: https://github.com/juliohm/ImageQuilting.jl/blob/master/src/iqsim.jl#L167 How would you dispatch the iterations so that all cores in the client computer are busy working? There is any construct in the language for that

Re: [julia-users] Interact and PyPlot - @lift and withfig()

2015-08-02 Thread Júlio Hoffimann
I got it, the widgets are shown automatically by @manipulate, I'm changing the code already. Thanks, Júlio. 2015-08-02 16:42 GMT-07:00 Júlio Hoffimann : > Hi Shashi, > > When I type: > > s = slider(1:10) > a = @lift eye(s) > display(s) > > fig = figure() > @

Re: [julia-users] Interact and PyPlot - @lift and withfig()

2015-08-02 Thread Júlio Hoffimann
Hi Shashi, When I type: s = slider(1:10) a = @lift eye(s) display(s) fig = figure() @manipulate for a=a; withfig(fig) do imshow(a) end end I get the interactive plot correct, but an extra undesired print of the array in Jupyter. What I can do to fix that? -Júlio

Re: [julia-users] Interact and PyPlot - @lift and withfig()

2015-08-02 Thread Júlio Hoffimann
l be: > > f = figure() > lift(s) do slider_val >withfig(f) # This basically says "do the drawing on the same plot f." > .... plot something with slider_val... > end > > > > > > > On Mon, Aug 3, 2015 at 12:06 AM, Júlio Hoffimann < > julio.ho

[julia-users] Interact and PyPlot - @lift and withfig()

2015-08-02 Thread Júlio Hoffimann
Hi, Suppose I have: s = slider(1:10) img = @lift eye(s) How can I create the interactive plot in Jupyter using @lift? @lift imshow(img) I know @manipulate has the withfig() option where we can pass the PyPlot Figure object, what about @lift? -Júlio

Re: [julia-users] Re: Interact - basic usage

2015-08-02 Thread Júlio Hoffimann
Thank you Shashi. -Júlio

[julia-users] Interact - basic usage

2015-08-01 Thread Júlio Hoffimann
Hi, Suppose I have: idx = slider(1:3) How do I use the value stored in the widget to index an array, let's say A[idx]? I tried playing with signal() and @lift, but none worked. Could you please explain what is the correct approach? -Júlio

Re: [julia-users] NaN definition for Integer types?

2015-07-24 Thread Júlio Hoffimann
Thank you all, I'll try to figure out a good solution for my use case. -Júlio

Re: [julia-users] NaN definition for Integer types?

2015-07-24 Thread Júlio Hoffimann
Thank you all, that is what I thought, I will stick with plain Float64 for now. -Júlio 2015-07-24 10:59 GMT-07:00 Erik Schnetter : > On Fri, Jul 24, 2015 at 1:09 PM, Júlio Hoffimann < > julio.hoffim...@gmail.com> wrote: > >> Hi, >> >> Is there any definition of

[julia-users] NaN definition for Integer types?

2015-07-24 Thread Júlio Hoffimann
Hi, Is there any definition of NaN for Integer types? Let's say I want to create a matrix with some unspecified entries, that is entries marked special. I am using NaN for Float64 but would like to make it work with other types too. Suggestions? -Júlio

Re: [julia-users] Re: Convert Array{Tuple} to Matrix

2015-07-07 Thread Júlio Hoffimann
Yes, unfortunately the unset values shouldn't be listed as 0 for instance. I'll try move forward with my current implementation and see if the code is ok. > Thanks, -Júlio

Re: [julia-users] Re: Convert Array{Tuple} to Matrix

2015-07-07 Thread Júlio Hoffimann
Hi Matt, That is a very good suggestion! I'm using Julia 0.4, how would you retrieve the locations from an AbstractArray? immutable SpatialData <: AbstractArray{Real,3} end is all that is needed to define the type? -Júlio

Re: [julia-users] Re: Convert Array{Tuple} to Matrix

2015-07-07 Thread Júlio Hoffimann
What I'm actually trying to do is create a type for spatial data: typealias SpatialData Dict{Tuple{Integer,Integer,Integer},Real} data = SpatialData([(i,j,k) => rand() for i=1:10, j=1:20, k=1:30]) However I need to do some checks on the size of the bounding box, (10,20,30) in this case. What I'

Re: [julia-users] Re: Convert Array{Tuple} to Matrix

2015-07-06 Thread Júlio Hoffimann
Hi Simon, Thank you, will check it later. -Júlio

Re: [julia-users] Convert Array{Tuple} to Matrix

2015-07-06 Thread Júlio Hoffimann
Hi Tim! I'll try the loop or change some types to avoid the issue. Thank you! -Júlio

[julia-users] Convert Array{Tuple} to Matrix

2015-07-06 Thread Júlio Hoffimann
Hi, How to convert: 1000-element Array{Tuple{Integer,Integer,Integer},1}: (10,2,1) (5,7,10) (5,7,4) (1,1,6) (2,3,6) (8,6,4) (10,2,4) (1,3,9) (9,3,7) (5,2,4) ⋮ (1,6,8) (4,6,6) (3,9,5) (10,4,10) (8,7,4) (4,8,9) (2,6,10) (3,6,5) (1,7,10) in

Re: [julia-users] Tests failing on latest Julia

2015-06-25 Thread Júlio Hoffimann
Hi Matt, The tests are still failing for the same reason, should I open an issue on GitHub? -Jùlio

Re: [julia-users] Tests failing on latest Julia

2015-06-22 Thread Júlio Hoffimann
Thank you very much Matt. -Júlio

Re: [julia-users] Tests failing on latest Julia

2015-06-22 Thread Júlio Hoffimann
Any progress? Can I do anything on the user side? -Júlio

[julia-users] Tests failing on latest Julia

2015-06-18 Thread Júlio Hoffimann
Hi, One of my packages is now failing tests due to some change in Julia, what exactly is the change that is causing the issue? http://pkg.julialang.org/?pkg=ImageQuilting&ver=nightly -Júlio

  1   2   >