Using arbitrary polygons as markers in Makie.jl
Hi, I know I can make any polygon as a vector of Point2f0 and plot it with poly!. However what I’d like to do is use this polygon as a marker for a scatter plot. is this possible? how? I couldn’t find...
View ArticleMultiple dispatch with module and external functions
Hello everyone, Julia newbie here. My problem revolves around multiple dispatch. The following is a pseudo-code and might not adhere to the proper syntax. custom_module.jl module custom_module export...
View ArticleSignal (7): Bus error
hi guys, I hope you are all are still alive and healthy after this terrible ordeal with covid-19 thingy. I have a question regarding data save using JLD2 package. Please see following the error that I...
View ArticlePlotting a distribution of planes
A distribution of planes is an map that assigns a plane to each point of space. For example: A distribution can be defined by giving a field of normal vectors to the planes (more precisely, a...
View ArticleHelp with using the "for" command
Hello I’m trying to make the “for” compile all the variables in the model, but whenever I compile it just returns the variable “c” Can anybody help me ? Thank you!! using JuMP, MathOptInterface, GLPK,...
View ArticleHow to open, run and see results form .jl file
I have installed Julia and Pluto. Now I’d like to open .jl files, run those files and see results. Files are from [GitHub - vinhphunguyen/MPM-Julia: Julia implementation of the material point method...
View ArticleExtending `getproperty`
So I want to extend getproperty (and likewise setproperty!) for a custom type, a bit like what LinearAlgebra.LU does. I see that this is usually done with an if/else chain; however, this is not very...
View ArticleHow to handle missing values in conditions
I have a dataframe with zeros and missing values and I would like to create an indicator array that assigns a one if the value is zero and a zero otherwise. I would like missing values to be included...
View ArticleGet shortest/longest string in array
What is the best way to retrieve the shortest or longest string in an array? If there are multiple candidates having the same minimum/maximum length, it’s okay to return just the first one. This can...
View ArticleDot abruptly ends Julia session
I’m new to Julia. The following code abruptly ends my Julia 1.5.3 session (Julia has exited.) at ii = 14 when I’m working in Windows 10, but it runs to completion when converting to ComplexF32. When I...
View ArticleInexactError when multiplying entirely missing matrices
I am trying to multiply matrices, some of which can be entirely missing. I would expect the result to be a missing value (similar to Python). Instead I get InexactError: trunc(Int64, Inf) omega =...
View ArticleIncrement some components of a vector
Hi, I’m trying to increment some components of a vector (for a finite volume code). Here is a MWE: components=[1,1,2] vector=zeros(3) increment=collect(1:3) vector[components]+=increment The value of...
View ArticleAdding packages using GitHub Actions
I am just starting to use GitHub Actions. When running a github_ci.yml script via GitHub Actions I am getting the following error: - Run `import Pkg; Pkg.add("BusinessDays")` to install the...
View ArticleHelp translating curl command to HTTP.jl
I would like to scrape data using the Spotify API and I cannot seem to get the example curl command to translate to HTTP.jl I am trying to get the accesstoken using my credentials. The relevant...
View ArticleHow to plot sub plots in layout using for loop
(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged) 1 post - 1 participant Read full topic
View ArticleUnable to guess system type on Chrome OS with linux (beta)
I get the following error in Julia’s package mode. (@v1.5) pkg> build ForwardDiff Documenter Interpolations Roots IntervalArithmetic QuadGK OffsetArrays LinearAlgebra Building CRlibm →...
View ArticleHow should I simplify nested loops?
I am trying to understand the julia codes I am learning, and I find it difficult to understand the nested loop, don’t know how that should be simplified instead. Since I am comfortable with python, I...
View ArticleHow to get number of Terms in @formula?
How to get number of Terms in @formula? Is any API? is a good way to do it? function nterms(model) if isa(model.rhs, Term) p = 1 else isa(model.rhs, Tuple) p = length(model.rhs) end p end 2 posts - 2...
View ArticleJulian way of defining custom numeric types
Hello, I am working with the DifferentialEquations package to play around some differential equations involving angles. Instead of letting everything go on as a normal float and just afterwards reduce...
View ArticleTimeout / early kill an external process
I want to do a terminal command (on linux) with a timeout. I know there is not a timeout built into the run command so I was trying to do something to make one. So basically I tried: function...
View Article