Indexing with Composite Type
Is there a way to easily create a Composite type where all indexing would apply to a ‘Matrix’ field in the type? For ex: Mutable Struct Foo hist::Int matrix::AbstractMatrix end bar =...
View ArticleHas sortrows disappeard?
Hi Apparently there use to be a function sortrows() in julia, that sorted the rows of matrix A lexicographically. It seems that this function has disappeared, am I wrong? Michael. 3 posts - 3...
View ArticleHow does the module system actually work?
Currently all of my files in my project look something like this: module ConstraintSetMod using ..DatasetMod export ConstraintSet, ... struct ConstraintSet ... fields ... end ... functions ... end And...
View ArticleAnimating the content of a title of a plot in Makie.jl
My “expected” way of animating the title of a plot does not work. MWE: using GLMakie fig = Figure() ax = fig[1,1] = Axis(fig) s = Observable(0) # counter of current step titlestr = lift(x -> "step...
View Article[Makie] How to plot a polygon with holes?
I am trying to plot polygons in Makie.jl, using the poly function. The documentation for that function is quite terse, to say the least. Does anybody have an example on hand of plotting custom...
View ArticleRead pdf as image
Hi. Would somebody suggest, Can I read pdf as images, please? Thank you so much!!! 2 posts - 2 participants Read full topic
View ArticleExtract a ZipFile
I am new to Juilia, and i’m doing a project that needs download free-access files, but they are in ZIP format, and i wanna know how extract them, because when i tried to do it whit the ZipFile.Reader...
View ArticleIs spzeros deprecated for creating sparse matrix in Julialang?
I am trying to understand how to create a sparse matrix in Julialang. The example project that I am learning in GitHub, I spotted spzeros() function which I believe it is going to create a sparse...
View ArticleSave @btime output
Is there a simple way to do this? I just want to save the time n in milliseconds e.g. n = @btime foo for some benchmark like: check = nothing function checkaaa() rand(10) * rand(10)' return nothing...
View ArticleStuck at please authenticate
I installed JuliaPro yesterday. I’m now trying to install a plotting routine using Pkg.add("Plots"). The Juno/Atom IDE opens an HTML pane and asks me to authenticate. As I signed up with gmail, I...
View ArticleProblems with Julia 1.5.3 installation
I watched movie about installation Julia and nteract (julia academy). After typing a command “add IJulia” Julia gives information about problems (see attached pictures). Connection with nteract does...
View ArticleSplit boolean array into array for sets of trues and false
Is there a function that does something like this: I have a Boolean array, e.g. input = [true,true,false,false,false,false,true,true,true,false,false,true]. I want to get a set of arrays for the...
View ArticleUnable to compile
Hello, Total noob here. I’m writing some Julia code and I wanted to make sure I can compile it (I’ll need to ship it in the future and can’t guarantee a local install). I can’t get the compiler to...
View ArticleDifferent dict iteration order between runs when altering unrelated code
I’m working on a game simulation. It uses a fixed set of input files to initialize all game state with. To generate random choices I have a single MersenneTwister instance that I allocate at startup,...
View ArticlePlotting the solution of a differential equation
I have written the Julia example for solving the Lorenz equation as in the page: Ordinary Differential Equations · DifferentialEquations.jl : function lorenz!(du,u,p,t) du[1] = 10.0*(u[2]-u[1]) du[2]...
View ArticlePassing data through function calls
Hi, Below is a small demo program that is working. The idea I am exploring is for a function (main in this case) to call a function (data in this case) that generates some data c and d. This data is...
View ArticleSymPy, jacobians, and Euler-Lagrange?
I’m trying to use SymPy to check some hand calculations regarding the use of the Euler-Lagrange equation. However, I get stuck because I cannot find functions for Jacobians, etc. in SymPy… First, I...
View ArticleProblems to install CPLEX v 20.10
Dear all, I had the software CPLEX v 12.8 on my computer and I worked with Julia. Recently, I have removed this version and updated to version 20.10 of this software. In the instalation of new version...
View ArticleHow @code_warntype , precompilation, execution and type interference works?
Hey Julianners, I found a really strange behavior! But shit is pretty serious thing all in all. using InteractiveUtils struct me{I,O} a::Vector{Array{Float32,I}} b::Vector{Array{Float32,O}} end...
View ArticleReplace missing values with zeros and nonmissing values with one in Dataframe
Hello, I would like to recode a dataframe containing positive numbers and missings such that every positive number is replaced with one and every missing is replaced with zero. I found some similar...
View Article