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

Zygote pullback vs gradient

Hello, I have a sequence to sequence Flux model which has a custom loss function and custom train function. I can do forward propagation. And also take the gradients of the model by using gradient...

View Article


Could not load library libGL.so.1

GR.jl depends on GR_jll.jl depends on Qt_jll.jl I am getting an error when I try to make a sysimage in a CentOS 7 container (x86_64 gnu linux) while behind a firewall, seemingly from this line: ERROR:...

View Article


Sunk with "In-Sync"

Julia is certainly beautiful. A Christmas gift. And… I am trying to use Julia and its modules. I keep getting this error as soon as I open the REPL: " Atom.jl: unrecognised message cacheCompletions. │...

View Article

Looking for a data structure that

I’m looking for a data structure that can insert, delete and mutate (given key) in order log n, and look at the max element in order 1. This is either a SortedDict or one of the trees in...

View Article

Incomplete installation reported when importing package for the first time

I installed the Plots package, but I get the following error when trying to compile it. I am using version 1.5.3 on Ubuntu. While installing this package, there was an interruption in between. What...

View Article


Try catch question

I use try JSON.parsefile(fname) do stuff content = "Nothing ..." end catch content = "File "*fname*" not found! "; end But it always returns that file was not found despite that JSON.parsefile(fname)...

View Article

This struct breaks an interface

I didn’t know how to word the title. But this object makes Juno throw errors. For context. I have some objects which are located all over the place (memory-wise). I want to query them and pass them to...

View Article

How to do escape_string

I am trying to use escape_string because as per documentation, “Backslashes ( \ ) are escaped with a double-backslash ( "\\" )”. This is what I tried: mypath1 =...

View Article


Simulating MOSFET equations with ModelingToolkit

Hello, I’m trying to model a MOSFET with ModelingToolkit using the most basic quadratic model, but having a lot of issues. The equations I came up with so far are as follows: using ModelingToolkit,...

View Article


Mandelbrot with Plots.jl

I’m trying to do a crude sketch of the Mandelbrot set to better my understanding of Plots.jl. But the code is taking way too long to execute. Thus I humbly ask for help. My class is as follows (the...

View Article

How to create a function that returns a vector of interpolated values

I currently trying to generate a function which will allow me to evaluate multiple linear interpolation functions at a single point and generate a vector of resulting values. The x values are the same...

View Article

Apply function to arrays of arbitrary dimensions

I want to write a function which will do some calculations with vectors and rotation matrices in 3D space (so 3 element, single dimension vectors and 3x3 element matrices of two dimensions). What is...

View Article

"ERROR: expected package... to be registered" in JuliaPro

I just downloaded JuliaPro 1.5.3 and am trying to follow this tutorial exactly: Julia Tutorial on YT. I went into Atom and tried to update the packages as was shown in the tutorial by issuing the...

View Article


Make a LCHab{Float32} color darker

I’ll be direct! I’m trying to make a LCHab{Float32} color made with Colors.jl darker; at first glance, I thought in iterating and giving it a smaller value, however perhaps I’m very dumb for not...

View Article

Programmatically load packages

I’m thinking of programmatically load packages. packages = [ "PackageCompiler", "Revise", "Pkg", "Weave" ] for package in packages using package end It seems that using treats package not as a...

View Article


Question on mocking of arbitrary function for testing

As I understand, Mocking package is mostly used for this. Something like: using Mocking function foo() @mock(bar()) Is there a way to avoid @mock? It looks a bit artificial. My understanding is that...

View Article

Question about concatenation using for loops

Hello, I am new to coding in general. I know this is probably a simple question, but I’ve been looking through documentation for about an hour. I have an array of eigenvalues, and I want to return a...

View Article


Can I create something like histogram2d using filter in Julia

i learned it is possible to create histogram like chart by using the Julia code using Plots a = randn(1000); b = [length(filter(x -> i <= x < i+.2, a)) for i = -4:.2:4]; bar(b); i know this...

View Article

Learning Julia by (ab)using constructor

I’ve just been trying to pick up Julia this morning. And I thought, what’s better than abusing so struct behaves like Python class! Totally understand things are preferably immutable, and methods...

View Article

Package development - guide required for good resources

What is the most canonical and careful presentation of the packaging infrastructure from the perspective of a package developer? I prefer text rather than video (much easier to hop into a bit...

View Article
Browsing all 2795 articles
Browse latest View live