See https://github.com/JuliaLang/julia/issues/7798
On Sunday, May 15, 2016 at 8:42:24 AM UTC-4, Davide Lasagna wrote:
>
> append!(some_int_array, repeated(1, 10))
>
Yes, there should probably be a method that allows an arbitrary iterator
for the second argument; currently only instances of AbstractVector are
allowed. A PR would be welcome.
Le dimanche 15 mai 2016 à 08:08 -0700, Ford Ox a écrit :
> Thanks Yu and Quinn.
>
> Now lets go one step further. Lets say I don't want to use any
> default parse function. I will make my own.
>
> type Buffer{T} x::T end
>
> function store!(b::Buffer{String}, c::Char) b.x = "$(b.x)$x" end
> func
Something relating to OpenBLAS is going wrong when I try to build the
latest master:
22736 Symbol names changed
ld: warning: could not create compact unwind for _sgbtrf_64_: stack subq
instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _shseqr_6
Thanks for the explanation!! That's exactly what I need at the moment,
though I clearly know that unpredictable return type could be dangerous.
Many thanks.
On Sunday, May 15, 2016 at 9:07:12 PM UTC+1, Kristoffer Carlsson wrote:
>
> It is possible but seems like something undesirable because you
It is possible but seems like something undesirable because you then don't
know if an Array{T,1} or Array{T,2} will be returned by the function. This
is something Julia people like to call "type instability" when the type of
your returned variables depend not only on the type of the arguments to
Thanks for the pointer for reshape.
Sorry that I failed to make my question clear enough. In fact, I wonder if
there is a function which can _automatically_ recast a single-column
Array{T,2} to an Array{T,1} and do nothing if this Array{T,2} has multiple
rows.
On Sunday, May 15, 2016 at 6
See reshape and vec.
Best,
--Tim
On Sunday, May 15, 2016 09:00:33 AM chobbes...@gmail.com wrote:
> Here is rookie question, which I have tried to find a similar question and
> answer in the history of this group, but failed. Please bear me.
>
> Since Julia distinguishes between Array{Float64,1}
Hi all. Suppose I have a large matrix with entries {0, 1} and I'd like to
keep storage small by using a BitMatrix. Are there any tricks to squeeze
better performance out of BitMatrix multiplication? I'm also curious about
the performance difference between Matrix{Bool} and Matrix{Int8}. Thou
Thanks, that's awesome. Based on that I have written function, that will
print out the method body right into the console (great when you operate in
REPL).
function functionbody(f::Function, types::Tuple)
filename, line = functionloc(f, types)
open(filename, "r") do f
for _ in 1:
Here is rookie question, which I have tried to find a similar question and
answer in the history of this group, but failed. Please bear me.
Since Julia distinguishes between Array{Float64,1} and Array{Float64,2},
even there is only one column in an Array{Float64,2}. Therefore, the type
of rand(
On Sunday, May 15, 2016 at 5:08:18 PM UTC+2, Ford Ox wrote:
>
> As a side note, is there anything like show_method_body(function)? I often
> want to see how is function base.xy implemented, but I have to manually
> search all the files which is quite exhausting.
>
>
>
There is @edit / edit
e.g. for a function like this:
tupleFun(a::Float64) = (a+1, a-1);
if I use
@vectorize_1arg Float64 tupleFun
I get for:
typeof( tupleFun(rand(3,3)) )
Array{Tuple{Float64,Float64},2}
How can I get a function which returns:
Tuple{Array{Float64,2},Array{Float64,2}}
(without an explicit for loop over al
Thanks Yu and Quinn.
Now lets go one step further. Lets say I don't want to use any default
parse function. I will make my own.
type Buffer{T} x::T end
function store!(b::Buffer{String}, c::Char) b.x = "$(b.x)$x" end
function store!(b::Buffer{Int}, c::Char, d::Int) b.x += (c - '0')*10^d end #d
Thanks Yu and Quinn.
One more question.
I want to further improve the reading speed, so I want to generate the new
string / int already when I am reading. - I am reading char after char
type IntBuffer end # can store one integer
type StrBuffer end
function next!(b::IntBuffer,
On Sun, May 15, 2016 at 2:29 AM, Stefan Schnell wrote:
>
>
> Hello community,
>
> I am fresh at Julia language and I am fascinated about the possibilities.
> At the moment I examine the possibilities to communicate with C libraries.
> And here I have a question.
>
> I have a structure of pointers
This depends entirely on context. If this code appears in a gobal scope (or
in the REPL) then each return value will be separately heap allocated. If
the code occurs in the middle of a function and the variables are all local
and Julia's compiler can infer the type of x, then x will be stored in
re
This appears to be a homework question. Just as on StackOverflow, it's not
ok to ask people to do homework problems for you on julia-users.
On Sun, May 15, 2016 at 7:07 AM, Rafiul Nakib
wrote:
> Can anyone please help me on this?
>
Can anyone please help me on this?
Hello community,
I am fresh at Julia language and I am fascinated about the possibilities.
At the moment I examine the possibilities to communicate with C libraries.
And here I have a question.
I have a structure of pointers as parameter for a C function
struct connparam{
charU * name
char
Hi Jonathan ,
Is there any way to implement multipart file upload in web
applications using julia?
On Wednesday, 2 September 2015 19:26:38 UTC+5:30, Jonathan Malmaud wrote:
>
> We are considering deprecating HTTPClient (a wrapper around libcurl) in
> favor of Requests.jl (a mostly p
Hi,
shouldn't this be allowed?
append!(some_int_array, repeated(1, 10))
ERROR: MethodError: `append!` has no method matching
append!(::Array{Int64,1}, ::Base.Take{Base.Repeated{Int64}})
Closest candidates are:
append!{T}(::Array{T,1}, ::AbstractArray{T,1})
The same with zip, drop, filter
Since these are just normal integers they will (assuming you are putting
them in a function) be allocated on the stack so no gc will need to run.
If x instead allocated something then the previous x would still be in
memory until the gc desides to clean them up. I'm not sure about the exact
qu
It works on the smart keyboard for me. Otherwise, you have to press the “play”
button in the toolbar.
> On 15 May 2016, at 5:11 PM, Andrew Gibb wrote:
>
> Is there a way to do shift-enter to execute a cell using the iPad software
> keyboard? Does shift enter just work on the hardware keyboar
I work on numerical/scientific code, so my experience may be different than
more traditional programming uses.
Atom is great. I tried the original JunoLT, and it put me off from Julia
for awhile, but I feel at home in Atom. Nice tip: there's a package for
hidpi if you have a 4K screen. It will
Renaming an existing package can cause problems if anyone else has started
using or depending on it. You can deprecate the existing name of the
package by adding an upper Julia version number bound on all existing tags
of the package in METADATA, so it will no longer be installable once newer
v
John, I tried your branch which works as expected, thank you. I found
that there has been a PR at
https://github.com/JuliaLang/julia/pull/13545 related to REPL hooks,
not sure how much this overlaps with your solution. In any case, I
hope to see this functionality merged.
Does anyone have any tips on changing a packages name? I am looking to
expand EEG.jl to encompass other electrophysiological techniques, and think
the name Electrophysiology.jl would be more accurate.
Is the general consensus to keep the old repo around and provide a warning?
Or, change the name
Just from pure curiosity.
x = 10
x = 100
x = x << 2
x = foo() # returns int64
Will x after any of these instruction use new memory storage (thus there
will be two x variables present, until gc deletes the one with no pointer)?
If yes, does it affect performance significantly?
Is there a way to do shift-enter to execute a cell using the iPad software
keyboard? Does shift enter just work on the hardware keyboard?
30 matches
Mail list logo