Le mercredi 12 octobre 2016 01:45:25 UTC+2, Jared Crean a écrit :
>
> Very nice summary, thanks for posting. One question I had was what should
> the signature of a function be to receive a generator? For example, if the
> only method of extrema is extrema(A::AbstractArray), is that too
>
On Wed, 2016-10-12 at 20:03, Yichao Yu wrote:
> On Wed, Oct 12, 2016 at 1:22 PM, esproff wrote:
>
>> Consider the code:
>>
>> abstract AbstractFoo
>>
>> type Foo <: AbstractFoo
>> end
>>
>> f(x::AbstractFoo, y::Integer) = "method 1"
>> f(x::Foo, y::Real) =
Seems like nothing I try is working now:
Version 0.6.0-dev.896 (2016-10-07 08:16 UTC)
Commit 38a63bd* (3 days old master)
x86_64-redhat-linux
julia> using Polynomials
INFO: Recompiling stale cache file
/home/nbecker/.julia/lib/v0.6/Polynomials.ji for module Polynomials.
WARNING: The call to
Tom, I appreciate the quick response. Your example does produce a plot with
the appropriate ylimits, however the use of subplots is important for my
application since I have multiple data sets of varying size that I would
like to show on different subplots with a common set of ylimits (or
Is there a way to make the yaxis and/or the xaxis limits uniform across
subplots in Plots.jl?
For example, given the code:
using Plots
gr()
p1 = Plots.plot([1, 2, 4])
p2 = Plots.plot([1,5,10,3])
Plots.plot(p1,p2,layout=(1,2))
The hope would be to substitute something along the lines of
This should work as you want:
plot([[1, 2, 4],[1,5,10,3]], layout=2, link=:all)
There seems to be a bug with the link attribute when combining subplots.
I'll look into it.
On Wed, Oct 12, 2016 at 2:13 PM, r5823 wrote:
> Is there a way to make the yaxis and/or the xaxis
When I call:
using Plots
plotlyjs()
plot(
xlims = (0,2),
xscale = :log10,
)
I get a plot where the xaxis is log scale and ranges from 1 to 100, as I
would expect. However, if I call:
plot(
xlims = (-3,2),
xscale = :log10,
)
I do not get a plot where the xaxis is log scale and ranges from
On Wed, Oct 12, 2016 at 2:41 PM, Mauro wrote:
> On Wed, 2016-10-12 at 20:03, Yichao Yu wrote:
> > On Wed, Oct 12, 2016 at 1:22 PM, esproff wrote:
> >
> >> Consider the code:
> >>
> >> abstract AbstractFoo
> >>
> >> type Foo <:
This should be fixed on master now. Just add "link = :all" to your
original example.
On Wed, Oct 12, 2016 at 2:48 PM, r5823 wrote:
> Tom, I appreciate the quick response. Your example does produce a plot
> with the appropriate ylimits, however the use of subplots is
It's not on purpose. It is just that it hasn't been implemented yet. It
would be great if you could open a pull request with such a method.
You might also want to define a special type for C+λI such that you can
avoid creating a new matrix but it is probably better to experiment with
such a
On Wed, 2016-10-12 at 21:23, Mauro wrote:
> On Wed, 2016-10-12 at 20:49, Yichao Yu wrote:
>> On Wed, Oct 12, 2016 at 2:41 PM, Mauro wrote:
>>> However, somewhat similar, this does not error:
>>>
>>> julia> g(x) = 1
>>> g (generic
Is there a preferred/standard way to create transposed view of a matrix.
More or less I want something like:
Y = permutedims(X, [2,1])
To return a view into X. Is the `PermutedDimsArray` that Tim Holy was
working on going to be available in Base soon?
Is the answer buried in this thread
Does that mean that an empty array comprehension is always Array{Any}?
that array comprehensions are now type-inference-independent. That means
> that the type of the resulting array only depends on the actual types of
> values produced, not what the compiler can prove about the expression in
Thanks a lot Chris your insight has been extremely helpful
I'm aware of UTF-8 only in Julia 0.5 and LegacyEncodings.jl (and some of
the proposed changes in 0.6, still I think only for basic UTF-8 support,
not full Unicode, e.g. collation).
[What/which language would have gold-standard Unicode (UTF-8) support, if
not Perl; Rust (or Go)? Julia?
On Tuesday, October 11, 2016 at 3:39:55 PM UTC+2, Tamas Papp wrote:
>
> I have a dataset of many (about 30 million) observations of the type
>
> Tuple{Person, Array{DataA,1}, Array{DataB,1}}
>
> where
>
> immutable Person # simplified
>
> immutable DataA
>
> I would like to dump this data in
For example, I want
collect_ragged(countfrom(1), [2,3,4])
to return
3-element Array{Any,1}:
[1,2]
[3,4,5]
[6,7,8,9]
I implemented it as
function collect_ragged(iterator, lengths)
result = Vector(length(lengths))
s = start(iterator)
for (i,l) in enumerate(lengths)
Looking back at this I agree I misunderstood Kristoffer, however I don't
think that this is the problem.
For context, my custom type is defined as follows:
type Parjm
x::Array{Float64,1}
y::Array{Float64,1}
end
So the subelements of, say, temp[1,:A] are always arrays of Float64. If
Thanks for writing this up; it's helpful to see certain things highlighted
and explained in more detail than news.md gives!
Hi,
I am new to Julia and I was trying to learn it by doing some basic linear
algebra workout : )
I was trying to compute the matrix (C + lambda * I), where C is Symmetric
and I is the uniform scaling. However apparently the sum operator for these
two object is not defined. I was wondering
f(n) = [ i^2 for i = 1:n ]
julia> f(0)
0-element Array{Int64,1}
On Wednesday, 12 October 2016 07:10:37 UTC+1, Jussi Piitulainen wrote:
>
> Does that mean that an empty array comprehension is always Array{Any}?
>
> that array comprehensions are now type-inference-independent. That means
>> that
However,
g(n) = sum( i^2 for i = 1:n )
julia> g(0)
ERROR: MethodError: no method matching zero(::Type{Any})
Closest candidates are:
zero(::Type{Base.LibGit2.Oid}) at libgit2/oid.jl:88
zero(::Type{Base.Pkg.Resolve.VersionWeights.VWPreBuildItem}) at
pkg/resolve/versionweight.jl:80
Perfect, thanks.
Jared Crean
On Wednesday, October 12, 2016 at 2:40:03 PM UTC-4, harven wrote:
>
>
>
> Le mercredi 12 octobre 2016 01:45:25 UTC+2, Jared Crean a écrit :
>>
>> Very nice summary, thanks for posting. One question I had was what
>> should the signature of a function be to
The Plots convention is to set the actual number in the "lims" attribute,
*not* the exponent. Do "xlims = (1e-3, 1e2)"
However, it seems like the PlotlyJS backend doesn't handle this properly...
I'll have to look into it.
Also, for anyone else, the best venue for quick questions like this is in
Just fixed on master:
using Plots; plotlyjs()
plot(rand(10), xlims = (1e-3,1e2), xscale = :log10)
On Wed, Oct 12, 2016 at 2:59 PM, Tom Breloff wrote:
> The Plots convention is to set the actual number in the "lims" attribute,
> *not* the exponent. Do "xlims = (1e-3, 1e2)"
You might get some ideas here https://github.com/alsam/OffsetArrays.jl
On Saturday, October 8, 2016 at 6:39:19 PM UTC+2, Brian Rogoff wrote:
>
>
>
> Hi,
> I saw in the release notes that Julia added support for different
> array indexing methods. I decided to try my hand at implementing zero
Very nice summary!
I assume that there's a mile-long issue discussing this somewhere, but why
doesn't the return type also assert that convert returns a value of the
correct type?
type A end
Base.convert(::Type{Int}, ::A) = "hey"
foo()::Int = A()
foo() # returns "hey"
On Wednesday, October
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
I'm thinking of a new algorithm for Julia..
I'm most concerned, about how much needs to fit in *RAM*, and curious what
is considered big, in RAM (or not..).
A.
For 2D (or more), dense or sparse (including non-square), is at most a 2
billion for any highest dimensional a big limit? Note for
On Wed, Oct 12, 2016 at 1:22 PM, esproff wrote:
> Consider the code:
>
> abstract AbstractFoo
>
> type Foo <: AbstractFoo
> end
>
> f(x::AbstractFoo, y::Integer) = "method 1"
> f(x::Foo, y::Real) = "method 2"
>
> foo = Foo()
> f(foo, 1)
>
> This code results in an ambiguity
I just *immediately* found a bug thanks to the redefinition warning:
julia> using Plots; plotlyjs()
> INFO: Recompiling stale cache file /home/tom/.julia/lib/v0.5/Plots.ji for
> module Plots.
> WARNING: Method definition apply_recipe(Base.Dict{Symbol, Any},
> Type{Base.Dates.Date},
Hello julia-users,
I maintain a package that wraps a C++ library. One feature of this library
is called "tables". These tables are a widely used data format in my field
and they can store arrays of ints, floats, doubles, complexs, and
strings (the library defines a custom string type but it can
Somewhat off topic, as you seem to be dealing with ragged arrays. Are
you aware of https://github.com/mbauman/RaggedArrays.jl ? Also there
are references to other, older implementations:
https://github.com/mbauman/RaggedArrays.jl/issues/2
On Wed, 2016-10-12 at 16:16, Tamas Papp
Consider the code:
abstract AbstractFoo
type Foo <: AbstractFoo
end
f(x::AbstractFoo, y::Integer) = "method 1"
f(x::Foo, y::Real) = "method 2"
foo = Foo()
f(foo, 1)
This code results in an ambiguity error, since both methods contain one
argument with a more specific type declaration than the
On Wednesday, October 12, 2016 at 9:26:54 PM UTC-4, Stefan Karpinski wrote:
>
> That's a fair point. It seems like it could/should be handled by the same
> (not-yet-implemented) mechanism that ensures that `convert(T,x)::T` is
> true. Of course, we could choose to enforce this fact via
Hi David,
Thank you for your elaborated answer and for writing a package for general
queries, that is great! I will keep the package in mind if I need something
more complex.
I am currently looking for a lightweight solution within DataFrames,
filtering is a very common operation. Right now, I
Works great for gr and pyplot backends, but still trouble with plotlyjs
On Wednesday, October 12, 2016 at 2:53:19 PM UTC-4, Tom Breloff wrote:
>
> This should be fixed on master now. Just add "link = :all" to your
> original example.
>
> On Wed, Oct 12, 2016 at 2:48 PM, r5823
That's a fair point. It seems like it could/should be handled by the same
(not-yet-implemented) mechanism that ensures that `convert(T,x)::T` is
true. Of course, we could choose to enforce this fact via lowering in this
case, independent of enforcing it for convert.
On Wed, Oct 12, 2016 at 7:40
Hi Julio,
you can use the Query package for the first part. To filter a DataFrame using
some arbitrary julia expression, use something like this:
using DataFrames, Query, NamedTuples
q = @from i in df begin
@where
@select i
end
You can use any julia code in . Say your
do you have traditional main memory RAM in mind here ... ?
with flash memory facilitating tremendous advances
in (near) in-memory processing, the lines between
traditional RAM and flash memory have become
considerably blurred.
~ cdm
On Wednesday, October 12, 2016 at 3:23:58 PM UTC-7, Páll
On Tuesday, September 20, 2016 at 5:08:41 AM UTC-4, Tony Kelman wrote:
> At long last, we can announce the final release of Julia 0.5.0! See the
> release notes at https://github.com/JuliaLang/julia/blob/release-0.5/NEWS.md
> for more details, and expect a blog post with some highlights within
Hello,
I am a problem when I use pmap function to do parallel computing on a 48
cores workstation. The workstation has Linux system. I am using a recent
updated julia-0.4.5. I downloaded the binary version and set up path to bin
file to call Julia.
It is fine to do
julia abc.jl
However,
Were you worried about Query being not lightweight enough in terms of
overhead, or in terms of syntax?
I just added a more lightweight syntax for this scenario to Query. You can
now do the following two things:
q = @where(df, i->i.price > 30.)
that will return a filtered iterator. You can
I'm trying to build a cross compiled version for Windows using Windows
Subsystem For Ubuntu
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
commit 683945155c64b8b68bf03d768745d650d4df142a
$ cat Make.user
override XC_HOST = x86_64-w64-mingw32
I get the
Thank you very Much David, these queries you showed are really nice. I
meant that ideally I wouldn't need to install another package for a simple
filter operation on the rows.
-Júlio
2016-10-12 22:14 GMT-07:00 :
> Were you worried about Query being not lightweight enough
I have some jpeg images saved as base64 encoded strings (such strings can
be produced by ```stringmime("image/png", convert(Image, rand(5,5)))```
using Images.jl). but I tried a whole day and cannot convert them back
(without disk I/O)...
46 matches
Mail list logo