Skip to main content
Filter by
Sorted by
Tagged with
4 votes
2 answers
130 views

This is kinda of a niche question because it requires having working with Julia and R at the same time, but I've hit a wall with an issue when using {furrr} to process code in parallel and I decided ...
Ariel Mundo's user avatar
2 votes
1 answer
136 views

I am trying to make a contour plot with Makie. I would like to have custom labels on the lines. So instead of the number on the contour, it displays some text (particularly the variable I have as ...
Mstislav Keldysh's user avatar
1 vote
0 answers
57 views

The @info collapses the array and also tries to print it as column which makes no sense for logging. How to tell it to print full array? Without overriding the default printing/show functions globally ...
Alex Craft's user avatar
  • 15.8k
Advice
1 vote
4 replies
97 views

Circular shifting cshift in fortran as an equivalent in Julia : circshift. But I'am seeking an equivalent of eoshift (https://fortranwiki.org/fortran/show/eoshift) which is a acyclic shifting that ...
aitzkora's user avatar
  • 339
-2 votes
0 answers
64 views

I got this error for updating Julia to the latest version using Juliaup: PS C:\Users\Shayan> juliaup update Checking for new Julia versions Checking for new version on channel 'nightly' is taking a ...
Shayan's user avatar
  • 6,706
2 votes
1 answer
63 views

I would like the legend to my scatter/line plot to be inside the axis of the plot it is informing, but I can only seem to get a legend if is has its own axis, which becomes a problem when I want three ...
Anna's user avatar
  • 25
0 votes
0 answers
39 views

I'm trying to run the below code. using Catlab using Catlab.CategoricalAlgebra using Catlab.Theories using Catlab.Graphs using Catlab.Graphics @present SchGraph(FreeSchema) begin V::Ob E::Ob src::...
huck's user avatar
  • 1
-2 votes
1 answer
151 views

NOTE: The answer is not so simple, see update below Is the multi dispatch function call with ::Type{Algo1} as fast as the plain function? Simple version algo1_Init() = 0.0 @inline algo1_update(state) =...
Alex Craft's user avatar
  • 15.8k
2 votes
3 answers
121 views

I want to create an array that would accept any type (it fail): values = fill((; some=missing), 10) values[1] = (; some=1) without writing bloated code like this values = Vector{NamedTuple{(:some,),...
Alex Craft's user avatar
  • 15.8k
1 vote
1 answer
80 views

As a newbie in Julia, I want to use a specific environment for a new project using juliaup as a version/environment manager. But every time that I create, activate and add a package, when I want to ...
eliasmaxil's user avatar
1 vote
1 answer
85 views

How to implement @parallel_map macro? results = @parallel_map for i in 1:10 i^2 end So that it won't use Any like code below (I assume it slow down code)? results = Vector{Any}(undef, 10) # ...
Alex Craft's user avatar
  • 15.8k
1 vote
1 answer
60 views

I'm using the package IntervalRootFinding for finding the zeros of a function. By design, the package returns an array with the zeros as an interval, like: 11-element Vector{Root{Interval{Float64}}}: ...
user2820579's user avatar
  • 3,541
3 votes
1 answer
41 views

Julia 1.11.7 (Also tried in 1.10.1) on Linux. Plots v1.41.1 using Plots; gr() titles = hcat(["X "*string(x) for x in collect(15:-1:8)'], ["X "*string(x) for x in collect(0:7)']) ...
Jen-Feng Hsu's user avatar
0 votes
0 answers
65 views

I am trying to use the Julia language to solve a system of partial differential equations. I found the modeling tool kit to be quite helpful. I can solve the unsteady heat equation for multiple ...
Nick Brady's user avatar
0 votes
1 answer
56 views

How to implement text"Hi $(1+2)" # => Hi 3? If possible I would like to keep following structure: macro bind_doc() quote text(s::AbstractString) = println(s) macro text_str(...
Alex Craft's user avatar
  • 15.8k
2 votes
2 answers
95 views

How to get source of function for report generation, without copy pasting? code(text) = println(text) μ_model(period, vol_q, Q) = begin lp = log(period) exp(Q[1] + Q[2]lp + Q[3]vol_q) end code(...
Alex Craft's user avatar
  • 15.8k
3 votes
1 answer
116 views

I'm trying to write a parametric struct where one of the parameters is a Boolean value type, and where the type of a member should depend on the value of this Boolean. The struct should also inherit ...
MadScience's user avatar
4 votes
2 answers
189 views

I pass in a vector that is sorted in descending order and manually sum until a certain integer is reached. In the first function below, I let the for loop continue until the end, but in the second ...
Earl Brown's user avatar
0 votes
1 answer
45 views

I have a value-parametric struct struct T{p} ... end where p::Int is expected. For each concrete type T{p}, I want to maintain a global(!) constant with value f(p) for some function f. The point ...
Bubaya's user avatar
  • 893
0 votes
1 answer
159 views

I updated from julia version 1.11.5 (everything worked well) to version 1.11.6. And VS code stopped seeing Julia and I can't write programs in it. "You must have Julia installed for the best ...
Dmitrii Dogadin's user avatar
2 votes
1 answer
96 views

I have a function that generates plots in Makie. I want to compute a bunch of these plots and turn it into a gif. The data for these plots is usually difficult to compute, so maybe at best I can ...
Mstislav Keldysh's user avatar
2 votes
1 answer
201 views

I have written a simulation in Rust which was previously written in Julia. I need to make sure that the results confirm; the simulation relies heavily on random numbers. I don't want to use any brute-...
MechWright's user avatar
0 votes
0 answers
110 views

Right now I am running a model optimization to optimize one set of parameter for several sites (in total 47 sites, i.e. the cost function sum over these 47 results). Site computation is independent ...
Xu Shan's user avatar
  • 325
2 votes
3 answers
50 views

I am looking to parse the results from the @testset macro from Test.jl, but am having trouble accessing the DefaultTestSet that is created implicitly. I am looking to run a testset, and save the ...
Jonathan F.'s user avatar
1 vote
1 answer
71 views

By default the run button (triangle) in VS Code runs as new process, not in REPL. This is only available in the drop down next to it. Is it possible to set running in REPL as default? Note: I am ...
Laurence_jj's user avatar
0 votes
0 answers
101 views

I used to be able create HTML output from Quarto using Julia and Plotly to get semi-interactive figures. But it does not work anymore and I am not able to figure out why. Here is an MWE. _quarto.yml ...
ITA's user avatar
  • 3,940
0 votes
0 answers
48 views

I am very new to Julia. I am working on a project written in Julia and I am using the following script: import Pkg Pkg.activate(@__DIR__) project_root = normpath(joinpath(@__DIR__, "..", &...
Raul Guarini Riva's user avatar
0 votes
0 answers
68 views

Essentially I'm following the example in the guide (posting only the relevant part, the full example is at this repo embryos = [fertilising_room(population_model) for _ in 1:POPULATION_SIZE] chunks = ...
jjmerelo's user avatar
  • 23.6k
3 votes
2 answers
100 views

Is there global setting to round everything that's printed to the terminal in Julia to 4 decimal places? Any print - float, arrays, matrices, dataframes, structures - if it has float it should be ...
Alex Craft's user avatar
  • 15.8k
1 vote
1 answer
95 views

I'm working with Julia's Symbolics.jl and I'm trying to compare two symbolic matrices. However, since Symbolics.isequal function checks for structural- instead of mathematical-equivalence it is ...
haifisch123's user avatar
1 vote
1 answer
60 views

I do not understand how constructors interact with the type system at all in the following circumstance. struct Monomial{T<:Number} coeff::T exp::Int end struct Poly{T<:Number} exprs:...
learningjulia83's user avatar
3 votes
2 answers
59 views

I am confused about how one can get automatic type conversion in Julia. This goes especially for function arguments. Here is dummy code behaving in a way that I wouldn't expect: import Base: convert, ...
learningjulia83's user avatar
2 votes
1 answer
56 views

I have some list of parameters and some complicated function that computes something based on these parameters. I then want to compute some list in the following way: params = [1,2,3] func(x) = x+1 ...
Mstislav Keldysh's user avatar
0 votes
1 answer
89 views

Every time I press Shift + Enter to execute the line, I see broken julia output in REPL. With different runs it breaks characters at different positions, sometimes it's s sometimes so etc. The REPL ...
Alex Craft's user avatar
  • 15.8k
1 vote
1 answer
39 views

I want to make a heatmap of values that are compute over a triangular lattice. The issue is, that this seems to not display correctly. For example, the following code gives the following output: using ...
Mstislav Keldysh's user avatar
1 vote
1 answer
79 views

I am trying to run the following code in Jupyter notebook: f = Figure(size = (800, 800)) Axis(f[1, 1], backgroundcolor = "black") xs = LinRange(0, 2pi, 20) ys = LinRange(0, 3pi, 20) us = [...
Mstislav Keldysh's user avatar
0 votes
0 answers
60 views

I am trying to follow a tutorial which requires the Lathe package. To install the package, I did: using Pkg Pkg.add("Lathe") This returns the error: Resolving package versions... ERROR: ...
Khara's user avatar
  • 3
0 votes
0 answers
47 views

I am using the Python library juliacall to be able to run functions written in Julia within a Python framework. I am using Visual Studio Code IDE with the Julia and Python extensions that offer nice ...
ClariB's user avatar
  • 1
1 vote
1 answer
54 views

On a multi-user Linux platform, you want to install a Julia environment once while it is being used by many users (possibly at the same time). One can create a central installation of a Julia ...
Bart Theelen's user avatar
1 vote
1 answer
85 views

in Julia, im trying to check the type of a variable and i expected it to show both the type and the value like 'int 10'. but when i use typeof(x), it just shows the type, e.g., Int64. how can i ...
Issa's user avatar
  • 23
0 votes
1 answer
165 views

I am on a standard Windows machine trying to set up a new Julia project, but I'm completely unable to install any packages. Every attempt to run Pkg.instantiate() fails with the exact same error, the ...
user2004820's user avatar
-1 votes
2 answers
72 views

I have been trying to contribute to a project that is owned by someone else, and hosted on a remote github repository. The project is written in Julia and I am using VScode as the editor. However, I ...
Reader Manifold's user avatar
0 votes
0 answers
32 views

I upgraded Julia to version 1.10.9 but the Jupyter kernel to which the Julia extension is configured seems not to recognise this upgrade. How can I ensure that the Julia upgrade is also extended to ...
Smara Kazenango's user avatar
1 vote
1 answer
50 views

I'm writing a Julia package for testing the behaviour of floating point addition. module TestModule const base_add = Base.:+ # used for storing information when addition is done mutable struct ...
Will Woolfenden's user avatar
0 votes
0 answers
22 views

I want to delete multiple objects from S3 with AWS.jl. Looping over S3.delete_object() works fine, but is not that fast. using AWS @service S3 bucket = "my_bucket" keys = ["tmp/file1&...
fc9.30's user avatar
  • 2,611
1 vote
0 answers
54 views

Perhaps a slightly obscure issue, but does anybody know of a way (short of building a custom system image) to disable precompilation of the Downloads package in Julia 1.11? Background: my org's (maybe ...
bencarabelli's user avatar
0 votes
0 answers
43 views

I have tried a tutorial for ProfileView (https://github.com/timholy/ProfileView.jl): function profile_test(n) for i = 1:n A = randn(100,100,20) m = maximum(A) Am = ...
armando's user avatar
  • 1,508
1 vote
1 answer
90 views

I am having trouble protecting a buffer from being garbage collected while using my own MPI bindings in Julia. In particular I am using this function: function Recv(buf::Ref{T}, count::C_int, datatype:...
jorge ezpeleta's user avatar
0 votes
2 answers
104 views

Not sure whether this is intended behaviour, but it confuses me: When I do match(r"\d+", "10, 11, 12") I only get the first match, in this case m.match <- "10". m....
Hadamard's user avatar
1 vote
1 answer
76 views

Here is some example Julia code. module ExampleModule const d = Dict{String, Any}() const i = 32 function print_d() println(d) end function modify_d() global d d["new_key"] = ...
user2138149's user avatar
  • 18.7k

1
2 3 4 5
257