Quantcast
Channel: First steps - JuliaLang
Browsing all 2795 articles
Browse latest View live

Output of functions

@angeloaliano1 wrote: Dear users, I have the following function: function Test(u,v,w) x = sum(v) y = prod(v) z = u .+ v return (x,y,z) end But,if I want only the first, or only the second or only...

View Article


CSV.read: why do String columns show up as PooledArrays?

@Sam_Johnson wrote: I’m opening a simple .CSV file with CSV.read with no parameter modifiers. The returned DataFrame is fine and describe(df) gives me the correct element types, which are all Int64 or...

View Article


Info: registering a new package - where can i find the UUID?

@fipelle wrote: Hi, I am trying to register a (small) package I wrote for time series analysis. I am using it as a backend for more sophisticated algorithms that I plan to release on GitHub in the...

View Article

Trying to bend my mind to Julia's way

@LStoleriu wrote: Hi everyone, I’m a C&Maple physicist trying to learn the “true” Julia way of solving problems. As a small project I’m trying to solve a nonlinear equation doing something like...

View Article

Are anonymous functions efficient in allocation terms?

@rna1990 wrote: Simple question: As a little step in a function I’m working on, I need to filter a unit range, say 1:5, just by taking one of its elements away, say 2. I understand that filter() is...

View Article


Why does in-place array assignment behave differently here?

@groovyda wrote: Hi - I’m new to Julia, been playing around a bit. I’ve been struggling to understand the below. I have some code where I need to switch some values in an array. I get (surprisingly)...

View Article

How to export Julia data to a .CSV

@RaquelSantos wrote: I created an empty DataFrame and would like to export the data I got with the model solution I compiled for the DataFrame. I am doing so, and still showing error. df =...

View Article

Julia doesn't recognise any installed packages

@Calum_H wrote: Hi all, Quite new to Julia packages so apologies if this is obvious. I’ve been creating and using two packages which are in my dev path. This has been working for a few weeks no...

View Article


Image may be NSFW.
Clik here to view.

BoundsError: attempt to access "attempt to access a data frame with 6 columns...

@Irene_Marchand wrote: Hello everyone, I am a little confused and I need your help because I am not able to understand my error. I wrote this two functions but for both of them I have the following...

View Article


@printf thread safety in Julia 1.3?

@Zhong_Pan wrote: I heard that in Julia 1.3 I/O will be thread safe. Is it so? In a multi-threaded for loop, if I’m using @printf to write to DIFFERENT files (one file per thread id), should I still...

View Article

Distributions getting started example does not work

@ramonz wrote: Hello After trying the “Getting started example” in https://JuliaStats.github.io/Distributions.jl/stable/ documentation I get an error which I wasn´t expecting. > using Random,...

View Article

Mutating a Set during iteration

@Vasily_Pisarev wrote: Is it safe to iterate over a set and mutate it in process? Say, I have a Set{Int64} and want to replace all negative values in it by their absolute values. Is it OK to for x in...

View Article

Statically built .exe program using PackageCompiler.jl has dependency on...

@Zhong_Pan wrote: Back in March 2019 when I was still using Julia 1.0, I built an example script into an executable binary on Windows to showcase the usage of a library I made in a standalone command...

View Article


Array{

@ablaom wrote: julia> Array{<:Any} == Array{<:} false So what’s the difference? Posts: 5 Participants: 4 Read full topic

View Article

Define a variable that depends on a previously defined variable in JuMP

@Jayzyu wrote: Hello all, I am trying to define a variable that is dependent on a previously defined variable. A close example is as follows: N=10 nodes = 1:N model=Model()...

View Article


JULIA_NUM_THREADS and physical cores

@Arno wrote: In the documentation about JULIA_NUM_THREADS it states: “If $JULIA_NUM_THREADS exceeds the number of available physical CPU cores, then the number of threads is set to the number of...

View Article

Julia Packages Peacefully Coexisting in Multi-language Github Projects

@zot wrote: I have a project that should include packages for several different languages (back end code), along with some common artifacts (front end things HTML, JS, and CSS). Is there a way to...

View Article


PlotlyJS/Orca not installed properly

@Calum_H wrote: (topic withdrawn by author, will be automatically deleted in 24 hours unless flagged) Posts: 1 Participants: 1 Read full topic

View Article

PlotlyJS/Orca.jl not installing properly

@Calum_H wrote: Hi all, Had some bizarre issues with Julia lately so decided to start from scratch and freshly re-install Julia v1.2 and all packages. Mostly things are working again now but for some...

View Article

How to make this piece of code faster?

@ennvvy wrote: I have a piece of code involving a large matrix. I have been trying to optimise it. I have exhausted all my options, I would like to know of suggestions that experts on this forum might...

View Article
Browsing all 2795 articles
Browse latest View live