[julia-users] Re: Nonuniform arrays

2014-09-03 Thread James Porter
I think this sort of thing is usually called a ragged array, you might find more use cases, examples, etc., googling for that term. +1 on having a package for this, Array{Array{T}} often feels very awkward. On Tuesday, September 2, 2014 9:03:56 AM UTC-7, Reid Atcheson wrote: A common

Re: [julia-users] live plotting in PyPlot.jl?

2014-09-03 Thread Sheehan Olver
OK I simplified my code, so now it just requires the following commands for wave on square + dirichlet (PDEs on disks/cylinders will come soon..): using GLPlot, GLAbstraction, ModernGL, ApproxFun h= 0.005 # u0 =

[julia-users] Re: Nonuniform arrays

2014-09-03 Thread Keith Campbell
+1 for such a package.and for Ragged Array.

[julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread Neal Becker
I hope the goal is for slicing to work like numpy. Stefan Karpinski wrote: No, this is a pretty contentious issue. A lot of the relevant discussion is in #4774 https://github.com/JuliaLang/julia/issues/4774. The one thing everyone agrees on which is going to happen in 0.4 for sure is that

Re: [julia-users] CoordInterpGrid

2014-09-03 Thread Jude
Hi Tim, Yes, it turns out it was an issue with my computer. I now have it working fine. In any case, I was wondering is there any package or any way I can interpolate over an unevenly spaced grid? Cheers, Jude On Tuesday, September 2, 2014 5:54:41 PM UTC+1, Tim Holy wrote: As it is, this

[julia-users] fminbound in Matlab

2014-09-03 Thread Jude
Hi, I am in the process of converting my Matlab code to Julia. I see that there is a package called NLopt available but rather than spending time trying to decipher the syntax, I was wondering if anyone knows the syntax for doing something similar to Matlab's fminbnd, eg, I have something like

[julia-users] Embed julia in C/C++

2014-09-03 Thread Einar Otnes
Dear experts, I've looking at the documentation Embedding Julia (http://julia.readthedocs.org/en/latest/manual/embedding/) to figure out how I can call my own julia functions from within C, and I'm struggling to figure out how I should define the jl_module_t that corresponds the module I've

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread Stefan Karpinski
It depends on what you mean. If you mean non-copying slices, then yes. If you mean that all singleton slices are dropped, then that seems less likely. On Wed, Sep 3, 2014 at 7:20 AM, Neal Becker ndbeck...@gmail.com wrote: I hope the goal is for slicing to work like numpy. Stefan Karpinski

[julia-users] Problem parsing file header

2014-09-03 Thread RecentConvert
What is an easy way of parsing a line of comma separated double quoted strings into an array of strings? I have some CSV files with multiple headers lines. In Julia 0.2.1 I did it this way. eval(parse(cols = [ * cols[1:end-2] * ])) # -2 to avoid the \r\n eval doesn't appear to exist in Julia

Re: [julia-users] build.jl for tests

2014-09-03 Thread Peter Zion
Thanks Kevin, that sounds like a good approach! On Tuesday, 2 September 2014 23:23:44 UTC-4, Kevin Squire wrote: Assuming you're using the Travis testing framework, one way to handle this would be to modify the .travis.yml to install MongoDB. For the Linux build, it would be easiest if you

[julia-users] Re: fminbound in Matlab

2014-09-03 Thread Steven G. Johnson
On Wednesday, September 3, 2014 9:05:07 AM UTC-4, Alex wrote: ## Make Container Function because I can only optimize over x, even though z is still a parameter function test_max(x,z) x[1]^2 + z end This is a bit more complicated than is necessary. Just write your objective as

[julia-users] Re: fminbound in Matlab

2014-09-03 Thread Steven G. Johnson
Note also that fminbnd uses box constraints, and the analogous thing in NLopt is to just write: lower_bounds!(opt, lbA1) upper_bounds!(opt, ubA1) However, Jude, I should also point out that I don't want to read the manual, please just write my code for me is not the most courteous way

[julia-users] Re: fminbound in Matlab

2014-09-03 Thread Jude
Alex and Steven, Thanks so much for your reply! It's really helpful! :) Stephen, I did spend a bit of time on it prior to sending this but was a little confused and this has really aided my understanding so thanks a lot! Jude On Wednesday, September 3, 2014 3:44:56 PM UTC+1, Steven G.

Re: [julia-users] trouble after updating Julia

2014-09-03 Thread Andrea Vigliotti
Hi all, I could compile Julia correctly again after make -C deps distclean-llvm (following an advice taken from the link posted by Kevin : https://github.com/JuliaLang/julia/issues/8200) but that meant I had to recompile the whole thing. I had also to 'make clean', after the first attempt,

Re: [julia-users] Re: Nonuniform arrays

2014-09-03 Thread Stefan Karpinski
I think RaggedArrays.jl is a good, clear name. Looking forward to a packaged version! On Wed, Sep 3, 2014 at 11:06 AM, Reid Atcheson reid.atche...@gmail.com wrote: I like the idea of renaming this to Ragged array. I'll go ahead and do that, and try to package-ify this. If I step on any toes

[julia-users] Re: Nonuniform arrays

2014-09-03 Thread Reid Atcheson
I like the idea of renaming this to Ragged array. I'll go ahead and do that, and try to package-ify this. If I step on any toes here by using ragged array then I guess people will let me know. Enforcing data contiguity might make certain operations hard that people might expect to be useful -

Re: [julia-users] trouble after updating Julia

2014-09-03 Thread Leah Hanson
Hey Andrea, You didn't do anything wrong. I think there's a bug in the Makefile that makes things sometimes break, which is unfortunate. -- Leah On Wed, Sep 3, 2014 at 10:06 AM, Andrea Vigliotti andrea.viglio...@gmail.com wrote: Hi all, I could compile Julia correctly again after make

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread ggggg
Would it be possible and/or worthwhile to allow indexing with dropped singleton dimensions with a period modified. eg a[1,:,:] works as now, returns an Array with 3 dimensions a.[1,:,:] returns an Array with 2 dimensions It sort of fits into the use of . as a modifier to represent broadcasting.

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread Bob Nnamtrop
I think using curly braces to denote indexing with dropped singleton dimensions would be nice: eg a[1,:,:] works as now, returns an Array with 3 dimensions a{1,:,:} returns an Array with 2 dimensions I realize this has syntax conflicts at this point but it seems it could be made to work. Bob

[julia-users] Julia way to determine if file was included or is main?

2014-09-03 Thread David Smith
Is there a preferred idiom in Julia to match the equivalent Python: if __name__ == '__main__': run_like_a_command() else: be_a_module() I tried searching, but apparently am not hitting the right keywords. Maybe my terminology is incorrect. Thanks, and sorry if this is obvious.

[julia-users] Re: Julia way to determine if file was included or is main?

2014-09-03 Thread Ivar Nesje
May I suggest searching for __main__ https://groups.google.com/forum/?hl=en#!searchin/julia-users/__main__? On Wednesday, September 3, 2014 7:20:46 PM UTC+2, David Smith wrote: Is there a preferred idiom in Julia to match the equivalent Python: if __name__ == '__main__':

[julia-users] Re: Julia way to determine if file was included or is main?

2014-09-03 Thread David Smith
Ha ha ha. Thank you. Clearly I need more coffee today. On Wednesday, September 3, 2014 12:32:56 PM UTC-5, Ivar Nesje wrote: May I suggest searching for __main__ https://groups.google.com/forum/?hl=en#!searchin/julia-users/__main__? On Wednesday, September 3, 2014 7:20:46 PM UTC+2, David

Re: [julia-users] Re: Julia talk at EuroSciPy 2014

2014-09-03 Thread Don MacMillen
Thanks for explanation Stefan. My goal was to use a constant vector inside a macro as a... constant vector. The benefits are obvious, I could feed the constant coefficients used in evalpoly into, say, evalpade, or do some computation between two or more constant vectors in a form I understand

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread David Smith
Add me to the list of people excited about slicing changes. Is there any way '|' could be distinguished from the boolean operation? As in, a|1,:,:| ? What about a[k,.,.]? The dots would remind me that it handles singleton dimensions in a special way. Ooh, what about a[k,\cdot,\cdot]?

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread Tim Holy
On Wednesday, September 03, 2014 10:57:16 AM David Smith wrote: Also, why don't we have a squeeze(A::AbstractArray{T,N}) method that eliminates all singleton dimensions? If we had that, indexing returning singleton dimensions wouldn't be as bad. Currently, having to write squeeze(a[k,:,:],1)

Re: [julia-users] Re: Julia talk at EuroSciPy 2014

2014-09-03 Thread Don MacMillen
Or rather (sound of head slap here) define a module dconst, make certain it it imported and in the macro use dconst.eval(dconst.name)? Don On Wednesday, September 3, 2014 10:47:00 AM UTC-7, Don MacMillen wrote: Thanks for explanation Stefan. My goal was to use a constant vector inside a

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread David Smith
Ok, so you can continue using the old squeeze. Us reckless types can use the aggressive one. ;-) I don't see why it shouldn't be available. Is there a fear that new users will run into subtle errors and hate Julia because of it? What I hate is typing squeeze(x, 1) all the time. On

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread John Myles White
Use vec On Sep 3, 2014, at 11:35 AM, David Smith david.sm...@gmail.com wrote: Ok, so you can continue using the old squeeze. Us reckless types can use the aggressive one. ;-) I don't see why it shouldn't be available. Is there a fear that new users will run into subtle errors and hate

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread David Smith
That does not do the same thing as squeeze on a 3+-dimensional array. On Wednesday, September 3, 2014 1:40:53 PM UTC-5, John Myles White wrote: Use vec On Sep 3, 2014, at 11:35 AM, David Smith david...@gmail.com javascript: wrote: Ok, so you can continue using the old squeeze. Us

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread Tim Holy
Sure, if you want to be reckless you can put this into your .juliarc.jl: import Base: squeeze squeeze(A::AbstractArray) = squeeze(A, filter(i-size(A,i)==1, 1:ndims(A))) You can of course choose to submit the second line as a pull request, and see what folks think. --Tim On Wednesday,

Re: [julia-users] Re: Nonuniform arrays

2014-09-03 Thread Reid Atcheson
I believe it is all in place now: https://github.com/ReidAtcheson/RaggedArrays.jl There is not a versioned release yet, which I will wait to do until it is a little more fleshed out. Functionality is still basic. On Wednesday, September 3, 2014 10:08:40 AM UTC-5, Stefan Karpinski wrote: I

[julia-users] LibCURL does not build...

2014-09-03 Thread Kevin W Li
This happened when I Pkg.add(IJulia) from a new Julia 0.3: julia Pkg.add(IJulia) INFO: Installing IJulia v0.1.15 INFO: Installing JSON v0.3.7 INFO: Installing REPLCompletions v0.0.3 INFO: Installing ZMQ v0.1.13 INFO: Building LibCURL ===[ ERROR:

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread David Smith
I think I'll hold out for an intrinsic notation, like x[k,\cdot,\cdot], or x[k,\vdots,\vdots]. Or x[k,_,_] I'd enjoy writing array manipulations more without squeeze's interspersed. On Wednesday, September 3, 2014 1:51:13 PM UTC-5, Tim Holy wrote: Sure, if you want to be reckless you can

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread Bob Nnamtrop
Yes, of course it is used for type parameters. But that seems straightforward to disambiguate from indexing an array. Bob On Wed, Sep 3, 2014 at 11:39 AM, Stefan Karpinski ste...@karpinski.org wrote: Indexing with curly braces already means something – that's how you specify type parameters.

[julia-users] PSA: Light Table Plugin Rename

2014-09-03 Thread Mike Innes
Hey all, Following IPython's rename to Jupyter I've updated the name of the Jupiter plugin in LT's plugin manager. If you have Jupiter or Jewel currently installed in Light Table, please remove them from the plugin manager. You can then reinstall the plugin by searching for Juno (the raw Julia

[julia-users] Re: PSA: Light Table Plugin Rename

2014-09-03 Thread David Smith
Thanks! I'm a very happy user of Juno+LT. I really enjoy the lesser-known key combos of C-d and C-m, which pop up help() and methods() for functions. On Wednesday, September 3, 2014 3:58:54 PM UTC-5, Mike Innes wrote: Hey all, Following IPython's rename to Jupyter I've updated the name

[julia-users] Re: PSA: Light Table Plugin Rename

2014-09-03 Thread David Smith
Ok, the Ctrl-d doc shortcut is broken now. I get this error. Do I still need the Jewel julia package? I get a similar error with Ctrl-m as well. - WARNING: LightTable.jl: `getthing` has no method matching getthing(::Nothing) in anonymous at

[julia-users] Re: PyPlot problems, no GUI backend for matplotlib

2014-09-03 Thread Steven G. Johnson
On Thursday, August 28, 2014 6:34:07 AM UTC-4, Steven G. Johnson wrote: The problem is that PyPlot doesn't currently work with Matplotlib 1.4; see https://github.com/stevengj/PyPlot.jl/issues/79 Hopefully I'll be able to fix this soon, but for now you probably need to use Matplotlib 1.3.

Re: [julia-users] Re: PSA: Light Table Plugin Rename

2014-09-03 Thread Mike Innes
Glad you like it! I'm not seeing this, though – what's your version of Jewel.jl? Did you Pkg.update()? On 3 September 2014 17:21, David Smith david.sm...@gmail.com wrote: Ok, the Ctrl-d doc shortcut is broken now. I get this error. Do I still need the Jewel julia package? I get a similar

[julia-users] ANN: FastAnonymous

2014-09-03 Thread Tim Holy
I'm pleased to announce the availability of the FastAnonymous package: https://github.com/timholy/FastAnonymous.jl Those of you who have used Julia for a while may know that things such as map(myfunction, collection) do not have ideal performance, and particularly the anonymous-function

Re: [julia-users] Re: PSA: Light Table Plugin Rename

2014-09-03 Thread David Smith
Ah, Pkg.update() fixed it. Thanks. Someday I hope to be such a pro Julia user that I always remember to try Pkg.update() first. On Wednesday, September 3, 2014 4:44:25 PM UTC-5, Mike Innes wrote: Glad you like it! I'm not seeing this, though – what's your version of Jewel.jl? Did you

[julia-users] Re: PSA: Light Table Plugin Rename

2014-09-03 Thread David P. Sanders
El miércoles, 3 de septiembre de 2014 15:58:54 UTC-5, Mike Innes escribió: Hey all, Following IPython's rename to Jupyter I've updated the name of the Jupiter plugin in LT's plugin manager. If you have Jupiter or Jewel currently installed in Light Table, please remove them from the

[julia-users] Re: PSA: Light Table Plugin Rename

2014-09-03 Thread David P. Sanders
OK, I worked out how to clear the console (right-click on the console space). Then when I click anywhere, I get - WARNING: LightTable.jl: stat: too many symbolic links encountered (ELOOP) in stat at ./stat.jl:43 in isdir at stat.jl:103 in filter! at array.jl:1214 in

Re: [julia-users] Re: PSA: Light Table Plugin Rename

2014-09-03 Thread Mike Innes
Ok, this is to do with the code that scans for the current module. Looks like you have a circular symbolic link on your system? Either way I can release a patch that ignores this error easily enough. On 3 September 2014 18:55, David P. Sanders dpsand...@gmail.com wrote: OK, I worked out how

[julia-users] Re: PSA: Light Table Plugin Rename

2014-09-03 Thread Mike Innes
Ok, give Pkg.update() a go On Wednesday, 3 September 2014 18:55:04 UTC-4, David P. Sanders wrote: OK, I worked out how to clear the console (right-click on the console space). Then when I click anywhere, I get - WARNING: LightTable.jl: stat: too many symbolic links

[julia-users] Matrix crossproduct by groups of rows

2014-09-03 Thread Giuseppe Ragusa
I have been struggling to find a fast and elegant way to implement the following algorithm. I have an Array{Float64, 2}, say X = randn(100,2) and an Array{Int64, 1}, call it cl which denotes row-blocks of X. More concretely: 0.863377 0.867817 1.0 -0.310559 -0.863393 1.0 1.74963

[julia-users] BeagleBone Black

2014-09-03 Thread 2Cubed
I would love to get Julia and/or IJulia up and running on my BeagleBone Black, but it seems that Julia is currently x86-specific. Any idea when it will be available for ARM?

[julia-users] ARGS and parallel processing

2014-09-03 Thread Thomas Covert
Is it possible to retrieve the contents of command line arguments in parallel processing mode? I'm having trouble making it work. For example, if the file temp.jl contains: addprocs(2) @everywhere println(ARGS) Then when I type bash$ julia temp.jl 1 2 3 I get: UTF8String[1,2,3] From

Re: [julia-users] ARGS and parallel processing

2014-09-03 Thread Isaiah Norton
The ARGS you see there are what is passed to each worker on startup. Try something like: @everywhere myargs = ARGS @everywhere println(myargs) On Wed, Sep 3, 2014 at 10:33 PM, Thomas Covert thom.cov...@gmail.com wrote: Is it possible to retrieve the contents of command line arguments in

Re: [julia-users] ARGS and parallel processing

2014-09-03 Thread Thomas Covert
that also doesn't work. here is the output: UTF8String[ From worker 2: UTF8String[--worker,--bind-to,10.0.0.6] 1,2,3] From worker 3: UTF8String[--worker,--bind-to,10.0.0.6] On Wednesday, September 3, 2014 9:59:30 PM UTC-5, Isaiah wrote: The ARGS you see there are what is passed to each

[julia-users] Reading sideways CSV file into a DataFrame

2014-09-03 Thread Leah Hanson
So, assuming you have a CSV file that looks like this: ~~~ Column One,2,3,4 Column Two,2,5,7 Column Three,1,9,8 ~~~ But each line has a lot more numbers in it. I would like to read it into a DataFrame, where the DataFrame would understand it as: ~~~ Column One, Column Two, Column Three 2,2,1

Re: [julia-users] Reading sideways CSV file into a DataFrame

2014-09-03 Thread Kevin Squire
Slightly sacreligious, but I would suggest reading it into Python Pandas and transposing it (possibly using the Pandas.jl interface). Julia's DataFrames doesn't support transposable tables (although there may be other ways to deal with it). Cheers, Kevin On Wednesday, September 3, 2014, Leah

[julia-users] Re: Reading sideways CSV file into a DataFrame

2014-09-03 Thread Jason Knight
I usually go straight to the source when looking for things in DataFrames as the documentation is missing quite a bit of functionality (push!, hcat, vcat, melt etc..) but in this case as Kevin mentioned: no dice. But you can always hack it: using DataFrames fname = datat.csv data =

[julia-users] Re: BeagleBone Black

2014-09-03 Thread Viral Shah
See the arm-make3 branch. I have an ARM chromebook, and it currently crashes in building the system image. I haven't been able to look into this further. I am guessing we will be ready in the 0.5 timeframe. If someone does want to try their hand at the ARM port, I can set up ssh on my

[julia-users] Difficulty building Nettle

2014-09-03 Thread Joshua Job
Hello all, I'm attempting to set up the ability to use an IJulia environment with the kernel operating on my university's cluster. I believe this should be possible, except that thus far I have been unable to build Nettle properly. The gist linked below is the message I get. It appears the

Re: [julia-users] Re: BeagleBone Black

2014-09-03 Thread Steve Kelly
I can confirm the arm-make3 branch does not build on the BBB. My company is interested in getting Julia on ARM. I think the biggest issue is that ubiquitous ARM devices are poor for building software quickly. Also with Red Hat and possibly Amazon entering the ARM server space this will become more