Basics of the usage of tasks
(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged) 1 post - 1 participant Read full topic
View ArticleMultiple dispatch by String alias
Hi there, Is it possible to make alias for String type some how which inherits all the logic from String and then make multiple dispatch by this custom type? For example: alias MyString = String #...
View ArticleDistributed Arrays
hello how can I divide DistributedArrays A=drand(5,5) B=drand(5,1) C=A\B Im doing this but still getting Error 4 posts - 4 participants Read full topic
View ArticleA guide: How to handle "ERROR: Unsatisfiable requirements detected ..."
Approximately once or twice a week (based on my feelings, not actual stats), I see a post asking about error: How to handle “ERROR: Unsatisfiable requirements detected …” It’s so common that I think...
View ArticleError: create a column from an existing array
Hello everyone, I’m trying to add a new column (in the first position) to an existing DataFrame (df) from an existing array (members) but when I run insertcols!(df,1, :Members =>members), it show...
View ArticleUndefVarError: Distributions not defined
Hi, I am very new to Julia but need it for numerical simulations for my master thesis. I am using the Distributions package, since I have to sample from a von Mises Distribution with parameter \kappa....
View ArticleFixed degrees between two subgraphs
I have a graph of N nodes, no edges. I partition the graph pinto two subgraphs with N1 and N2 nodes. I would like to create edges between the two graphs such that the degree distribution in each graph...
View ArticleUnknown warntype from Expr()
the following function: function symident(n::Int) rows = Vector{Expr}(undef, n) temp = zeros(Int, n) for i in Base.OneTo(n) temp[i] = 1 rows[i] = Expr(:row, temp...) temp[i] = 0 end return Expr(:vcat,...
View ArticleFloat64 is typecasted to float16
I am trying to calculate mean of some values. These values are of type Float16. When performing mean operation, I see the value to be Inf16. I tried to assign the result to a variable of type float64...
View ArticleStrange behavior of @spawn
I do not understand what is going on here: julia> test(i,j) = println("i = $i , j = $j") i = 0 for j in 1:4 global i += 1 Threads.@spawn test(i,j) end i = 4 , j = 2 julia> i = 4 , j = 1...
View ArticleList challenge
I have a list: my_list=collect(1:n)', and a repeatability vector: repeat_list = [n1, n1, n2, n1, n2, n2]. I would like to create a new list with repeated n1 times, 2 repeated n1 times, 3 repeated n2...
View ArticleJitter R function equivalent in Julia?
hi, I wanted to know if there’s an equivalent function to R’s jitter() that add noise to a value or vector of values. Thanks you. 8 posts - 3 participants Read full topic
View ArticleRegistering a package hosted on a public self-hosted gitlab instance
I am just looking at the registration process (I have never done it before), and I am not sure to fully understand everything. Is there a way to register on the General repository a (publicly...
View ArticleMatch a type or an instance of it
I want to write a function which can dispatch on the type as well as on an instance of it. I tried the following: struct mytype end f(Union{Type{mytype},mytype}) = 42 f(mytype) f(mytype()) Is there a...
View ArticleQuestion mark provides help when launching from REPL but not from ATOM notebook
The question mark provides help when launching from REPL. Example: help?> ? search: Welcome to Julia 1.4.2. The full manual is available at… The question mark does NOT provide help when launching...
View ArticleWhen should a function accept a symbol as an argument?
I stumbled across two situations where functions accept symbols as arguments, and wonder why they are designed that way. What advantages are there to using symbols? When should I write functions that...
View ArticleNewbie questions coming from Python/C++
Hi, I have extensive experience in Python and C++ and am trying out Julia. There’s a lot that I like from what I’ve seen so far, really nice language, packaging, documentation, introspection of...
View ArticleHow to get a GLM where formula is programmatically generated
I have a DataFrame and need to build a model where the predictors follow some naming scheme. For the example data below, suppose the scheme is “!=y”: using DataFrames using GLM data =...
View ArticleBest practices regarding Adjoint, when should it be used instead of Array,...
Very often I generate a structure like this, when all I want (as far as I know) is an array: 10×2 Adjoint{Float64,Array{Float64,2}}: 0.4988 0.5012 0.378885 0.621115 0.651367 0.348633 0.474066 0.525934...
View ArticleDifference between df.column and df[!, :column]
Hi, im seeing this two ways to call a column and testing into code cant see any difference, is one better that the other? thanks. 3 posts - 3 participants Read full topic
View Article