How do I create a new Array-like type with only ints and strings?
@Alex_Tantos wrote: Hi there! As am heading towards understanding the type system of Julia, I seem to not be able to do such a thing as to create-define a container type that would include only...
View ArticleWhat has the function `expand` been renamed to?
@jishnub wrote: I came across this old thread on literal_pow where the suggestion to introspect code is to use julia> @eval @which $(expand(:(1^2))) literal_pow(::Base.#^, x::Union{Complex{#s37}...
View ArticleAnnotation which doesn't depend on the scale?
@br500 wrote: Is there any way to add annotation (which doesn’t depend on the scale) to plot? I’ve seen: plot!(annotation = (0, 1, text(“example”))) but i want to “stick” annotation for example 15mm...
View ArticleUse GPU subfunction in a bigger-function?
@Ahmed_Salih wrote: Hello! My question title is properly worded poorly, but here goes. I have made a “subfunction”, called gpu_ParticlePackStep! which calculates properties for one particle. If I call...
View ArticleType parameters which depend on other type parameters
@jlchan wrote: Is there a way to specify a type parameter in a way that depends on another type parameter? For example, a StaticMatrix takes in types {M,N,T,L}, where M,N are dimensions and L is the...
View ArticleSome added modules fail on not loading `lib/julia/sys.so`
@Kunz-David wrote: Hello, I wanted to try out a module I’m working on a fresh installed linux with julia and ran into an error. I first tried to do a simple add module and test, but that failed, so I...
View ArticleJulia environments list
@martincornejo wrote: Starting a new Julia environment is very ease julia>] activate test (test) pkg> Is there a way to visualize a list of all the environments? Posts: 3 Participants: 3 Read...
View ArticleHow to obtain indices of an array satisfying boolean condition
@iamsuddhasattwa wrote: I am trying to find the optimum way of obtaining the indices of an array which satisfy a certain boolean condition. For example, if a is of type Array{Float64,1}, i wish to...
View ArticleAdding packages not available through Pkg.add
@iamsuddhasattwa wrote: I wish to add a package called FastConv which I found on github. However, trying to add it the usual way using Pkg does not work. julia> Pkg.add("FastConv"); ERROR: The...
View ArticleWhen will the original value be changed with the copied value?
@zxjroger wrote: I find out that the following code will change the value of solution to [1.1, 1.1, 1.1, 1.1], although I don’t really want to change its value. It seems that the value of solution is...
View ArticleWeird overwriting/extension of an operator based on whether it was ran...
@Benny wrote: I was reading up on automatic differentiation, and I noticed something weird about extending operators. I opened up the REPL and ran a couple of copied lines: julia> struct...
View ArticleHow do I sort a dictionary by its keys?
@NightMachinary wrote: I want to sort this by its keys: 5-element Dictionaries.HashDictionary{Int64,Any} 4 │ 0.2199244 2 │ 0.2000908 3 │ 0.19014 5 │ 0.2099752 1 │ 0.1798696 Posts: 4 Participants: 3...
View ArticleIllegal instruction in binary artifacts
@Pavel_Kalouguine wrote: It seems that I stumbled upon this issue: github.com/JuliaGraphics/Gtk.jl Illegal instruction Gdk.Pixbuf in libpng16.dll opened 04:39PM - 29 Feb 20 UTC kingW3 Error comes from...
View ArticleFetching results from a DB - how to handle a textcursor
@Jasper_Hall wrote: I am following along in the “Julia Programming Projects” book (by Adrain Salceanu). I have Julie 1.4.0 and have had to use some package versions that are obviously more recent than...
View ArticleHow to specify an NFA using Automa.jl?
@lesshaste wrote: I would like to convert NFAs to DFAs using the function nfa2dfa from Automa.jl. However I can’t see in the docs how to specify an NFA. Here is a toy example NFA....
View ArticleWhat is the Julia equivalent of np.fromfunction?
@rhezab wrote: Link to np.fromfunction documentation I would like to fill an array with values as a function of its indices. Posts: 5 Participants: 2 Read full topic
View ArticleGaussian Process
@Praise wrote: Hi, I would like to perform Gaussian Process Regression on a certain set of data I have in a csv file. Basically, I have a number of columns in my csv file. Now, based on what I have...
View ArticleERROR: UndefVarError: A not defined
@QUANG_VU_NGUY_N_PH_M wrote: g(x) = 2 + x A = 0 for i =1:2 A += g(i) end I got an error: ERROR: UndefVarError: A not defined. I thought that I defined A = 0 before the loop. How to fix this? Thank you...
View ArticleAccents and greek letters
@aquarelle332 wrote: Julia version: 1.4.1 Kubuntu: 18.04 LTS Hello, As a french-speaking person, I often use accentuated characters e.g., é (e-accute). When I run a simple code like this one: using...
View ArticleHow to apply two macros to a struct definition?
@SteffenPL wrote: I would like to use two macros to add extra functions to one struct, namely @with_kw (from Parameters.jl ) and @auto_hash_equals (from AutoHashEquals.jl ). using Parameters,...
View Article