Hi,
Quick question.
Say I have an array
testarray = [0.1,0.2,0.3]
Now, using an array comprehension, how could I create an array featuring
all members of testarray 0.1?
I tried
testarray2 = [testarray[i] 0.1 for i=1:length(testarray)]
and
testarray2 = find(x - x 0.1,testarray)
but
@Steven: I tried Pycall, but was unable to get LaTeX labeling to work.
On Wednesday, November 5, 2014 11:16:35 AM UTC-5, Steven G. Johnson wrote:
On Wednesday, November 5, 2014 12:34:15 AM UTC-5, yaois...@gmail.com
wrote:
Just getting into plotting data in Julia today. Gravitating
Hi all -- perhaps I am erring by necro-ing a thread from last year.
However, this was the closest thing I found to a survey of all the plotting
options available on Julia and I thought it wouldn't be so bad to revive
this thread for an updated discussion.
How is the field of plotting options
Just getting into plotting data in Julia today. Gravitating towards Winston
because of the similarity of its syntax to that of Matplotlib.
Anyhow, I did have a question about how to do multiple plots (on separate
figures) for Winston.
In Matplotlib, I can use
plt.figure(1)
...
plt.figure(2)
Thanks!
On Wednesday, November 5, 2014 1:03:01 AM UTC-5, K leo wrote:
pw=plot()
oplot(x1, copy(z1), r)
oplot(x1, copy(z2), g)
display(pw)
On 2014年11月05日 13:34, yaois...@gmail.com javascript: wrote:
Just getting into plotting data in Julia today. Gravitating towards
Winston
Hi Guys,
I'm struggling to find some examples regarding how to write line by line to
a CSV file. Scouring the documentation, I have been able to come across
this so far:
http://julia-cn.readthedocs.org/en/latest/stdlib/base/?highlight=writecsv
So I currently have a function that is part of a
Leah, thank you for saving the day again.
Regards,
Wally
On Tuesday, September 16, 2014 5:06:25 PM UTC-4, Leah Hanson wrote:
Is this what you're looking for?
~~~
julia csvfile = open(ysavetuple.csv,w)
IOStream(file ysavetuple.csv)
julia write(csvfile,ColName A, ColName B, ColName C\n)
Hi Keno,
So there was no lag or huge delay for you for the unpack function?
I am using a Mac OSX 10.9.4 system, Julia 0.3.0-RC1.
If you change nMCMC to 500, that should allow the algorithm to reach unpack
function in a reasonable amount of time while still having too long of a
pararray to
A workaround for this I found was, rather than appending to an array and
then unpacking the array, to create arrays of zeros for each parameter, and
then filling the arrays at each iteration. Perhaps that tidbit could clue
someone in on what the problem is -- unfortunately, I do not have enough
Hmm, so there was not even lag before the unpack? If you don't mind my
asking, what system are you running on?
Specifically, I am running on a Macbook Pro OSX 10.9.4 with a 2.6 GHz Intel
Core i7 and 16GB of ram 1600 MHz DDR3, which should be enough for a task
like this. Nonetheless, because of
I understand that the OP may no longer be following the thread, so my
previous post is also a general question to the community at large.
On Tuesday, August 5, 2014 8:01:32 PM UTC-4, yaois...@gmail.com wrote:
Frederick, thanks for following up with your post.
As a Julia newbie, I was just
Hi Keno,
Was just wondering if you were able to take a look?
Thanks,
Wally
On Friday, August 1, 2014 5:37:44 PM UTC-4, Keno Fischer wrote:
The code looks perfectly fine to me, so it certainly shouldn't crash.
I'll take a look.
On Fri, Aug 1, 2014 at 4:35 PM, yaois...@gmail.com
Hi guys,
So in short, I coded a model-fitting Markov chain to fit some parameters of
a neural network to existing data.
With few amounts of Markov chain iterations, the code works fine, but when
I run for longer, the code dies before it completes my function of finding
the parameters matching
Hi Jason,
This is the 0.3.0 - RC. I am not too familiar with memory, so I have yet to
use memtest. This is repeatable at the same number of iterations, at
different iterations, and the error message has repeated again at those
different iterations.
It will be hard for me to pare this down in
Is that from a different version of Julia?
*julia **rand(3*ones(12)...)*
*ERROR: `rand` has no method matching rand(::Float64, ::Float64, ::Float64,
::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64,
::Float64, ::Float64, ::Float64)*
On Friday, August 1, 2014 5:03:36 PM UTC-4,
Speed is tantamount for me right now because I am running repeated neural
simulations, so would looping still be the fasted way?
On Thursday, July 31, 2014 2:45:25 AM UTC-4, Gunnar Farnebäck wrote:
This is not the most efficient way, neither the clearest, but it's
compact. In a language like
Also Gunnar, I see that you have a single ampersand -- I can't seem to find
in the documentation yet when to use the single and when to use the double
-- I only see usage of the double ampersand.
On Thursday, July 31, 2014 2:45:25 AM UTC-4, Gunnar Farnebäck wrote:
This is not the most
Thanks Gunnar,
the issue disappears when I temporarily remove Varraycut[i-1].
Is there a way then that I could do what I want to accomplish with that
faulty code in a list comprehension?
Like in Python, I could do
count = sum([a0 and b==0 for a,b in zip(Varraycut,Varraycut[1:])])
On
Hi guys,
I asked this in a previous thread, but because that diverged off-topic from
my existing question, I decided to create a new thread.
Anyhow, say I have an array
outputarray =
Float64[-1.23423,-3.23423,-2.34234,-2.12342,1.23234,2.23423,-2.23432,5.2341,0.0,1.23423]
This array lists
I'm a bit stuck on this one. Could I get one more hint about a way I could
get the same thing done without using the illegal indexing?
On Wednesday, July 30, 2014 5:46:58 PM UTC-4, John Myles White wrote:
Yeah, it’s the combination of (a) the use of i and i+1 indexing with (b)
the use of a
So in Python, I would do something like this:
count = sum([a0 and b=0 for a,b in zip(countlist,countlist[1:])])
I am having a bit of trouble Googling for this, since I do not know the
right keywords to use, but is there a means of doing something similar with
a list comprehension in Julia?
Still some other things wrong with my code, but I think I figured out my
way around this issue. Thanks for the heads ups, John and Leah.
This is what I did:
function spikecounter(Varray)
Varraycut = splice!(Varray,1:spliceend)
push!(Varraycut,Varraycut[length(Varraycut)])
spikecount
Hi Julia users,
There are a number of things wrong with this script that I am working on,
but for the time being, I am trying to resolve a BoundsError() triggered
while slicing an array. Code is attached.
The source of the BoundsError() appears to be this function.
function
Ah, thank you!
This Google group community is fantastic.
On Thursday, July 24, 2014 6:32:19 PM UTC-4, Kevin Squire wrote:
Hi there,
In regards to a), I keep on getting the error message with the second
option
ERROR: type: apply: expected Function, got (Int64,Int64,Int64)
I'm guessing
Sweet, this is an incredibly fun language. Thanks!
On Friday, July 25, 2014 1:37:34 PM UTC-4, Leah Hanson wrote:
Here's one way to go about it:
~~~
julia tuplearray = [(3,2,1),(1,2,3),(3,1,2)]
3-element Array{(Int64,Int64,Int64),1}:
(3,2,1)
(1,2,3)
(3,1,2)
julia minimum(tuplearray)
Hi,
Translating some of my code from Python, I am trying to find a means of
concatenating and appending tuples to an array.
In Python, I was able to do this:
def createtuplelist:
tuplestorage = []
for i in range(iteration):
newtuple = foo(i)
tuplestorage.append(newtuple)
Ah, is ... equivalent to the * in Python?
On Thursday, July 24, 2014 12:40:12 PM UTC-4, John Myles White wrote:
You need to splat the tuple first:
push!(tuplestorage,newtuple...)
-- John
On Jul 24, 2014, at 9:38 AM, yaois...@gmail.com javascript: wrote:
Hi,
Translating some of
Even splatting does not seem to work.
My error message is now
ERROR: no method append!(Array{Float64,1},Float64,Float64,Float64,Float64)
Do I need to use a different sort of array?
On Thursday, July 24, 2014 12:48:15 PM UTC-4, Jameson wrote:
Yes
Or use append! instead of push!
On
Yes, now it works. Thanks!
On Thursday, July 24, 2014 2:17:36 PM UTC-4, John Myles White wrote:
That might be your problem. I only know how the release candidate for 0.3
behaves.
-- John
On Jul 24, 2014, at 11:16 AM, yaois...@gmail.com javascript: wrote:
Ah, gotcha. Splatting while
Hi all,
I thought to just add to my previous thread, but created a new one because
the topic is a bit different. Hope y'all don't mind.
Anyhow:
a) How would I concatenate two tuples? Or a tuple with a variable?
Say I have
testtuple = (1,2,3)
testvar = 4
and want to get
newtuple =
Leah, thanks for your detailed response --
I will take your advice and try to rework the code to pre-allocate for b).
In regards to a), I keep on getting the error message with the second option
ERROR: type: apply: expected Function, got (Int64,Int64,Int64)
Just making sure, are you using 0.3?
Thanks Leah, that was exactly what I was looking for!
On Tuesday, July 22, 2014 5:04:30 PM UTC-4, Leah Hanson wrote:
Because Julia has begin-end blocks, you can just use an empty block.
Here are some examples of what I mean:
~~~
function foo()
end
~~~
~~~
if true
elseif false
else
Matt, could you elaborate?
Sorry, not quite sure what the ? means -- does that mean 'or'? Also not
sure about what you mean by the phrase ternary syntax.
Here is loosely what I am trying to do:
for i in testarray
if testarray 0
do this
else
do nothing
It seemed
Hi,
I am working on a Markov chain Monte Carlo script right now and am trying
to figure out the parameter generation part of the script. In pseudocode, I
am trying to do
a = 0.1
b = 0.1
c = 0.1
function gen()
a = a + rand()
b = b + rand()
c = c + rand()
if a b c = 0
Hi Julia users,
I am absolutely embarrassed to ask this question, but I have not been able
to find the correct combination of query words to yield the desired answer
in the documentation or Google. Anyhow, what function could I use to raise
an array to a power?
testarray = Int64[1,2,3,4]
Thank you!
On Monday, July 14, 2014 5:45:16 PM UTC-4, Stefan Karpinski wrote:
On Mon, Jul 14, 2014 at 2:39 PM, Stefan Karpinski ste...@karpinski.org
javascript: wrote:
very difficult bit of punctuation
Incomplete sentence: very difficult bit of punctuation *to Google*.
36 matches
Mail list logo