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

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 Article


What 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 Article


Annotation 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 Article

Image may be NSFW.
Clik here to view.

Use 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 Article

Type 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 Article


Some 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 Article

Julia 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 Article

How 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 Article


Adding 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 Article


When 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 Article

Weird 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 Article

How 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 Article

Image may be NSFW.
Clik here to view.

Illegal 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 Article


Fetching 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 Article

How 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 Article


What 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 Article

Gaussian 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 Article


ERROR: 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 Article

Accents 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 Article

How 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
Browsing all 2795 articles
Browse latest View live