I tested 2 ways of constructing date array. But I got two different
types of the arrays from the two ways. How can I make them the same?
What is the proper Date type? At least, I hope not to use the Any type.
--
julia dats = [date(2014, 7, ii) for ii=1:4]
4-element
I have an Array{Any,1}, but I want to convert to Array{String,1}. The
only way I know is through comprehension.
julia dt
3-element Array{Any,1}:
2010/1/4T15:00:00
2010/1/5T15:00:00
2010/1/6T15:00:00
julia dts = [convert(String, dt[i]) for i=1:length(dt)]
3-element Array{String,1}:
Thanks. Didn't know about that syntax. Now with it, I might prefer the
following as Array{String,1} is exactly what I want.
julia dts1 = convert(Array{String,1},dt)
3-element Array{String,1}:
2010/1/4T15:00:00
2010/1/5T15:00:00
2010/1/6T15:00:00
On 2014年07月25日 10:40, Miles Lubin wrote:
julia VA
3-element Array{ASCIIString,1}:
A
B
C
julia VA * T
ERROR: `*` has no method matching *(::Array{ASCIIString,1}, ::ASCIIString)
Just found it works on DataArray:
julia da = DataArray([A, B, C])
3-element DataArray{ASCIIString,1}:
A
B
C
julia da * T
3-element DataArray{Any,1}:
AT
BT
CT
On 2014年07月25日 11:57, cnbiz850 wrote:
That sounds confusing. You just mentioned that Vector{String} is
semantically equivalent
I did the following on a DataFrame, but got error. What should I do
instead?
julia df = insert!(df, 25, dfa)
ERROR: `insert!` has no method matching insert!(::DataFrame, ::Int64,
::DataFrame)
using the latest build and most updated packages, I don't have that problem.
| | |_| | | | (_| | | Version 0.3.0-prerelease+3863 (2014-06-24
04:00 UTC)
_/ |\__'_|_|_|\__'_| | Commit c300f5f* (0 days old master)
|__/ | x86_64-linux-gnu
julia using DataFrames
julia
I use g2reader (http://www.g2reader.com) and can't subscribe to this.
Don't know why. It complains about:
Entered url doesn't contain valid feed or doesn't link to feed. It is
also possible feed contains no items.
On 06/17/2014 08:38 PM, Randy Zwitch wrote:
My apologies, I think the link got
Is there something wrong with the feed?
http://www.juliabloggers.com/feed/
juliabloggers.com
Entered url doesn't contain valid feed or doesn't link to feed. It is
also possible feed contains no items.
On 06/16/2014 08:52 PM, Randy Zwitch wrote:
Nothing shady about it at all and a good
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_)| Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type help() to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease+3680
The core dump has to do with removing sys.so. When I restored it, julia
did not core dump, instead, it printed out errors in my code.
On 06/16/2014 07:18 AM, cnbiz850 wrote:
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
/#introduction
http://docs.julialang.org/en/latest/stdlib/base/#introduction
-Jacob
On Thu, Jun 12, 2014 at 9:53 PM, cnbiz850 cnbi...@gmail.com
javascript:
mailto:cnbi...@gmail.com javascript: wrote:
Can't find a description. I guess that when
I use the following to delete a row:
function deleterow(df::DataFrame, row::Int)
return df[[1:row-1, row+1:end], :]
end
The time it takes to delete 1000 rows in a 22,000-row df is about 16
seconds.
Are there more efficient ways to do it?
Thanks very much Matt. It takes no time now.
On 06/12/2014 10:35 PM, Matt Bauman wrote:
You're making 1000 slightly different copies of your huge dataframe by
doing it one-by-one. Can you do all 1000 removals at once? Even if
you're finding the rows to remove iteratively, simply store a
Can't find a description. I guess that when it is used after a function
name it makes the modified array argument passed back to the caller. Is
that right, or is that all it is used for?
notes section, but if you
have suggestions of other places it should be mentioned, I'm sure it
wouldn't hurt!
http://docs.julialang.org/en/latest/stdlib/base/#introduction
-Jacob
On Thu, Jun 12, 2014 at 9:53 PM, cnbiz850 cnbiz...@gmail.com
mailto:cnbiz...@gmail.com wrote:
Can't find
On 06/10/2014 06:30 AM, J Luis wrote:
Hi,
I'm trying to install 0.3 via PPA (just updated to Ubuntu 14.01 to see
if worked better as I had other issues with 13.10) but all I get is 0.2.1.
I am on Xubuntu 14.04 and it works fine.
I only got the following formatted display but not my values. To me
this is really not desired, does everyone prefer this?
Can I get a printout of the values just as I print out a row of an array?
julia println(df[jj, 1:20])
1x20 DataFrame
|---|--||-|
| Col # | Name |
Thanks John for the update. Do I need to do a clone to get the new change?
I think there are two issues here. One is to display df, a row of it,
or part of a row, like
julia df
julia df[3, 1:20]
The other is to print out (to the terminal or to a file).
On the first issue, I hope
Since I deleted .julia_history2 yesterday, I don't have the history
errors now. Don't know if that was the culprit.
On 06/08/2014 08:02 AM, Stefan Karpinski wrote:
Please do let me know of it continues to be broken for you.
On Jun 7, 2014, at 6:41 PM, cnbiz850 cnbiz...@gmail.com wrote
Lately, every time I start up julia I got the following error. And
every time I have to delete ~/.julia_history. Why?
--
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_)| Documentation:
,
including example contents from a produced ~/.julia_history file.
On Sat, Jun 7, 2014 at 6:28 PM, cnbiz850 cnbiz...@gmail.com
mailto:cnbiz...@gmail.com wrote:
Lately, every time I start up julia I got the following error.
And every time I have to delete ~/.julia_history. Why
Thanks again for the help.
Yes, I do know the number of dimensions before the iterations start, but
it is high, as high as 50, and is different under different situations.
So I try to simplify code for that.
The cartesian package is interesting and I will study it. Besides that,
is there
Thanks very much for the summary.
It is very interesting that assignFromArray is much faster than
indexedArray. Can anyone explain why?
On 05/30/2014 05:42 PM, Jon Norberg wrote:
There have been several posts about this, so I tried to compile what I
could find to compare speed and pretty
I ran 2 julia programs each with a single CPU at the same time on a
machine with 8 CPU's. After sometime (while the programs are running),
the machine freezes - no mouse or keyboard responses. It happened a few
time this morning. This seems just happened to the newly built
versions. It was
with the
shared libraries that julia started to use recently.
On 05/31/2014 11:43 AM, Isaiah Norton wrote:
It will be helpful to know what you are running. Linear algebra
operations via OpenBLAS can use multiple threads.
On Fri, May 30, 2014 at 11:38 PM, cnbiz850 cnbiz...@gmail.com
I ran 2 functions in 2 separate julia sessions, each using a single
CPU. I found the processes' speed reduced to nearly half. Would anyone
explain/confirm?
what happened? Please share
your hardware information, as well as the code you were running.
On Tue, May 13, 2014 at 8:48 PM, cnbiz850 cnbiz...@gmail.com
mailto:cnbiz...@gmail.com wrote:
I ran 2 functions in 2 separate julia sessions, each using a
single CPU. I found the processes
Profile shows the two lines in the function being very expensive. Is
there anything inappropriate? Any way to improve?
function NoUpdate(data::Data)
data.cum[data.i] = data.cum[data.i-1]
data.i += 1
end
type Data
cum::Array{Float32,1}
i::Int32
...
end
down to be minimal?
if you provide more context, it's more likely someone could help you.
Cheers, Kevin
On Monday, May 12, 2014, cnbiz850 cnbiz...@gmail.com
mailto:cnbiz...@gmail.com wrote:
Profile shows the two lines in the function being very expensive.
Is there anything inappropriate
cnbiz850 wrote:
Profile shows the two lines in the function being very expensive. Is
there anything inappropriate? Any way to improve?
function NoUpdate(data::Data)
data.cum[data.i] = data.cum[data.i-1]
data.i += 1
end
type Data
cum::Array{Float32,1}
i::Int32
...
end
I hope this is related.
Why isn't part of a row of Array{T, 2} of Array{T, 1}? Consider vec1 in
the following example.
df = readcsv(fname)
vec1 = df[3, 1:4]
Thanks. This is a lot better in my mind because it gets rid of the
trouble associated with matching the orders of the fields, which can be
a big problem with many fields. I wonder what you mean by constructing
incomplete objects gratuitously is a bad idea.
On 05/11/2014 05:43 AM, Stefan
I tried to use comprehension in loops but found it somehow slower. In
the following example, the loop in first code is slower than in the
second. Would anyone please explain why?
===
function ffcombs()
[Int8[i1,i2] for i1 in II, i2 in II]
end
combs = ffcombs()
ii = zeros(Int8,2)
for
With Julia 0.3, readtable works.
On 05/10/2014 12:38 AM, Dustin Lee wrote:
I'm getting the following when trying to create a dataframe. I'd
appreciate some tips on how to troubleshoot this.
julia Julia Version 0.2.1
Commit e44b593905 (2014-01-30 13:47 UTC)
Platform Info:
System: Linux
As in the following example, new(aa,bb) is very redundant from coding
point of view. Since all fields are already declared and listed in the
type definition, is it possible not to list them again with the new
statement? The new statement can be very troublesome when the type has
many fields.
type AA
aa::Int
bb::Float64
end
is valid (and common).
On Fri, May 9, 2014 at 2:32 PM, cnbiz850 cnbiz...@gmail.com
mailto:cnbiz...@gmail.com wrote:
As in the following example, new(aa,bb) is very redundant from
coding point of view. Since all fields are already declared
I defined a composite type MyType. But when I modified it and tried to
rerun a code that uses it, I got error: invalid redefinition of constant
MyType. How can I avoid that?
Would anyone explain the differences between the following two ways of
defining a composite type?
=
type AA
aa
bb
function AA()
aa=1
bb=2
new(aa,bb)
end
end
type BB
aa
bb
end
function BB()
aa=1
bb=2
return BB(aa,bb)
end
My question is if x + A does not make sense in any way other than x .+
A, then why introduce .+ at all since + means intuitively .+ and is simpler?
On 05/02/2014 09:55 PM, Hans W Borchers wrote:
julia 5 + x
WARNING: x::Number + A::Array is deprecated, use x .+ A instead.
DataFrames is a package I have been battling with recently. I must
admit that getting a good knowledge about it is not easy, surely I hope
that is different for other people. But after going through a lot of
digging - searching the web, asking questions either here or at the
issues with the
On Linux, gedit is great. The julia plugin works really well, with
auto-completion.
On 05/05/2014 02:10 AM, Aerlinger wrote:
I'm using vim for the most part but was hoping to get a feel on what
other people are using or if there are good alternatives out there.
I've tried Julia Studio but it
Just found this page with tutorials on a few packages. The one I found
quite helpful, even though a little old, is on DataFrames, much more
helpful than DataFrames's original documentation.
https://github.com/JuliaLang/julia-tutorial
, at 11:04 PM, cnbiz850 cnbiz...@gmail.com wrote:
Just found this page with tutorials on a few packages. The one I found quite
helpful, even though a little old, is on DataFrames, much more helpful than
DataFrames's original documentation.
https://github.com/JuliaLang/julia-tutorial
I got a sense that Any is widely misused and mishandled in Julia. It
requires some cleanup. Anyone agree?
On 04/30/2014 07:41 PM, Ariel Keselman wrote:
see simplified behavior below:
https://lh4.googleusercontent.com/-buanLj1oJlU/U2DhZ4Fo2XI/HS4/xC8WkdiahEM/s1600/Capture1.PNG
My question is what is a symbol as in the following warning message?
=
julia df = DataFrame(A = 1:10, B = 2:2:20)
10x2 DataFrame
|---|||
| Row # | A | B |
| 1 | 1 | 2 |
| 2 | 2 | 4 |
| 3 | 3 | 6 |
| 4 | 4 | 8 |
| 5 | 5 | 10 |
| 6 | 6 | 12 |
Care to share?
That is a great tip, thanks.
I am having similar issues. I had the program in a file and run it with
include(prog.jl) at the julia prompt. It used to take 12 seconds per
1 loops. Now Putting it into a function and also changed some
variables to const, I got it down to 3 seconds per
for ff[1] in factors, ff[2] in factors, ff[3] in factors, ff[4] in factors,
ff[5] in factors, ff[6] in factors, ff[7] in factors,
ff[8] in factors, ff[9] in factors
To simplify the above, I tried the following but it didn't work:
for ff[1:9] in factors
Is there a similar simple way to
I think you are running Xubuntu Raring, which reached end of life, and
so they stopped building nightly for that OS. I am on Trusty and am
getting the nightly for Saucy.
On 04/23/2014 06:26 PM, Földes László wrote:
Is the Julia nightlies update every day as it used to do around
Copied the following test code from the online documentation. When
tried to run it, I got the errors. Any guidance please?
==
a = randn(1000)
@parallel (+) for i=1:10
f(a[randi(end)])
end
==
$ julia -p 4
_ _ _(_)_ | A fresh approach to technical computing
, cnbiz850 wrote:
Copied the following test code from the online documentation. When
tried to run it, I got the errors. Any guidance please?
==
a = randn(1000)
@parallel (+) for i=1:10
f(a[randi(end)])
end
==
$ julia -p 4
_ _ _(_)_ | A fresh approach to technical
, cnbiz850 wrote:
Sorry, the error messages must have to do with the undefined f. It
works with the folowing. So I guess simply adding @parallel (+) on a
for loop can then realize using multiple cores?
===
nheads = @parallel (+) for i=1:2
int(randbool())
end
===
On 04/19/2014
Searched but didn't find an answer.
Does Julia allow statement to continue on the next line?
:
If the expression is incomplete, continuation is automatic. There is no
explicit continuation syntax.
On Apr 16, 2014, at 6:01 PM, cnbiz850 cnbiz...@gmail.com wrote:
Searched but didn't find an answer.
Does Julia allow statement to continue on the next line?
Sounds like you have some broken packages in Ubuntu. I would open
Synaptic to resolve the broken packages first.
On 04/16/2014 06:17 AM, Stéphane Laurent wrote:
Hi,
I have just tried to install Julia but typing julia as a command
line does not run anything (command not found). I have
julia println(aa, , bb)
1.5231071779744345 33.97688693695
Is there a simple way to print
1.52 33.97
perhaps without the C format?
, cnbiz850 cnbiz...@gmail.com
mailto:cnbiz...@gmail.com wrote:
julia println(aa, , bb)
1.5231071779744345 33.97688693695
Is there a simple way to print
1.52 33.97
perhaps without the C format?
typeof(var) gives something too specific, like Int16, Float32, etc. Is
there a convenient way to determine if var is a number or something else
(string)? I tried isreal(var), but it gives an error in case var is not
a number.
OK, just found this.
typeof(var) : Number
On 03/24/2014 09:20 AM, cnbiz850 wrote:
typeof(var) gives something too specific, like Int16, Float32, etc. Is
there a convenient way to determine if var is a number or something
else (string)? I tried isreal(var), but it gives an error in case var
Use to determine something read in from a file.
On 03/24/2014 09:30 AM, Collin Glass wrote:
Hmm.. What's your use case? I mean you could just whip up a quick
function isnum that returns true if typeof is any of the collection of
formats.
On Sunday, March 23, 2014 9:20:51 PM UTC-4, K leo
On Ubuntu Trusty 64bits with i7 laptop, my result as follows. Notice
the difference from Jason's
julia @elapsed begin
x = 0
for n = 1:1
x += 1
end
x
end
4.576735929
julia function g()
Well, from this perspective, it makes sense why those strings should not
be mutable.
But from other perspectives, making strings immutable contradicts with
how natural languages are used. For instance, after I said I am a
professor, I want to say I am a scientist, or perhaps I change my
That doesn't seem to work. I got the the follow:
julia-studio-julia-0.3-compatibility/bin$ ./julia-studio.sh
./julia-studio.sh: 35: exec: ./JuliaStudio: not found
On 03/19/2014 10:56 PM, Uwe Fechner wrote:
Hi,
Julia Studio for Julia 0.3beta is available here:
Hi everyone, I am new to Julia.
JuliaStudio is broken for me with the new 0.3 nightly.
But I discovered gedit is great with Julia. It even has code completion.
Any other good environment?
65 matches
Mail list logo