How to install an old package without project.toml and manifest.toml?
I have an older package that I would like to use (https://github.com/davidlizeng/LinearLeastSquares.jl), but when I try to install it using the Pkg I get this error. (@v1.4) pkg> add...
View ArticlePyCall Fails to Build
PyCall is attempting to access a file at https://repo.anaconda.com/pkgs/main/win-64/ The file is called: https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json However, if you navigate to...
View ArticleDocumentation of JuliaFMI
Hello People! I am trying to simulate a FMU model in Julia, for the same I installed the package JuliaFMI. But I am not able to find any documentation of this package. In the readMe file of the...
View ArticleThe order of multiple dispatch
Hi, I am learning Julialang on Mac and Windwos. I have a question about the order of multiple dispatch. function dfunc(args::Int64) println(“Int64”) end function dfunc(args::Any) println(“Any”) end...
View ArticlePackage TextAnalysis, how to use most up to date version?
Hi all, I wanted to use TextAnalysis package. I added it, the version is 0.6.0. This versions is the last one according to github. (@v1.4) pkg> update TextAnalysis Updating registry at...
View ArticleConvert hex to base64
Hi, I’m new to Julia and want to try solving the cryptopals challenges using Julia: https://cryptopals.com/sets/1 However, I’m already struggling on the first task to convert hex to base64. This hex...
View ArticleSum isn't faster than a loop?
Hi guys, I’m computing a derivative from a summation. I thought vectorizing the function would be faster than a loop, but it isn’t the case. using BenchmarkTools, Random ωc = 0.05 chi = 0.01 const k =...
View ArticleWhat does "k for k = 1:3" expands out to be?
I am confused here julia> sum([1,2,3]) 6 julia> sum([k for k = 1:3]) 6 julia> sum(k for k = 1:3) 6 But when I expand out “k for k = 1:3” manually it does not work julia> sum(1,2,3) ERROR:...
View ArticleReference to two vectors?
suppose I have two vectors: a = [1, 2]; b = [3, 4] how could I create a single “reference” vector c, which is a concatenation of a and b, so that any changes in each would be reflected in the others??...
View ArticleWhy doesn't this view assignment work?
Hello. I am using the Images package to do some processing. I have an RGB image img, and I’d like to create a view such that I can index channels by name. My idea was to derive view slices from the...
View ArticleCassette.jl only on "high"-level / own defined module functions
I’m wondering whether I can overdup only on functions defined in a module. Basically if my module has the functions a and b, … which do a lot of work I only want to access the calls from one of those...
View ArticleHandling KeyError: key “nameOfKey” not found
I have a script that looks through a JSON structure. Every now and again, a particular key is missing. When these instances occur, I need the script to continue rather than stop. Here is my code: for...
View ArticleERROR: AssertionError: !(isnothing(idx_agg))
I am using julia 1.4.2. I am trying to make pivot table using aggregate function but showing ERROR: AssertionError: !(isnothing(idx_agg)) my data frame is like Row │ exp │ amount │ │ │ Float64 │...
View ArticleRow-wise function application (different functions)
Is there a more elegant / performant / built-in way to do this? Thanks in advance. "Apply each function in f_array to each element of the corresponding row." function func_array_eachrow!(W, f_array)...
View ArticleOrganizing Julia code
I understand that Julia projects conventionally have src and test directories. How does one connect the latter to the former? This works: include("../src/foo.jl") But perhaps there is a better way,...
View ArticleWhat's the best way to dispatch on an _iterable_ trait?
I find that it’s quite common for me to write a function that requires the input to be iterable. But I don’t think there is a good way to restrict it to that. I think I would love to see a trait...
View ArticleMutating arrays not supported
I want to change the output in a custom Flux layer, but when I try to do so, I get a “Mutating arrays not supported” error. I’ve tried playing with things a bit and while I can act on the array as a...
View ArticleFind n smallest values in an array
Given an array and an integer n, I would like to find n smallest elements of the array without sorting the whole array. Is there a pre-built function for this? 6 posts - 5 participants Read full topic
View ArticlePars a fluctuating parameter in an ODE
Dear Julia users, I am new to julia and I want to solve an ODE system with some fluctuating parameters. Let say that I have a fluctuating temperature T as function of time: T = 18 time =...
View ArticleTurn code into function
I’m having some trouble transitioning from R to Julia. In R, I don’t have to worry if the argument for the function is a scalar or a vector, but in Julia, I get very different results if I try to...
View Article