# Latest

**URL:** https://discourse.julialang.org/latest.md?page=470

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 471

---

## [Making Custom Colormap with Makie](https://discourse.julialang.org/t/making-custom-colormap-with-makie/110965)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 0\
**Last updated:** [February 29, 2024, 4:40pm UTC](https://discourse.julialang.org/t/making-custom-colormap-with-makie/110965 "2024-02-29T16:40:00Z")

</div>

Hello, I’m wondering what is the best way to implement my own custom colormap for use in Makie. I am using CairoMakie to generate plots and I want to be able to specify a colormap and then generate smaller maps from tho…

---

## [Inconsistent display of values with DataFrames](https://discourse.julialang.org/t/inconsistent-display-of-values-with-dataframes/110777)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 2\
**Last updated:** [February 29, 2024, 4:37pm UTC](https://discourse.julialang.org/t/inconsistent-display-of-values-with-dataframes/110777 "2024-02-29T16:37:31Z")

</div>

I’m not sure if it’s specific to DataFrames.jl but I noticed the following inconsistency: using DataFrames julia\> d = Dict(i=\>DataFrame(a=rand(1000)) for i in 1:10) Dict{Int64, DataFrame} with 10 entries: 5 =\> 1000×…

---

## [Startup.jl ...Exit.jl](https://discourse.julialang.org/t/startup-jl-exit-jl/110908)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 4\
**Last updated:** [February 29, 2024, 2:45pm UTC](https://discourse.julialang.org/t/startup-jl-exit-jl/110908 "2024-02-29T14:45:09Z")

</div>

Hi, We have the option run automatically things when Julia starts using the Startup.jl file. Is there something similar when you exist Julia? If it does not exist, is it a reasonable feature to ask for? Or is there a…

---

## [Best practice in package globals](https://discourse.julialang.org/t/best-practice-in-package-globals/110517)

<div class="topic-metadata">

**Author:** [@screw\_dog](https://discourse.julialang.org/u/screw_dog)\
**Replies:** 7\
**Last updated:** [February 26, 2024, 3:12am UTC](https://discourse.julialang.org/t/best-practice-in-package-globals/110517 "2024-02-26T03:12:34Z")

</div>

I’m developing a package that has a couple of settings that are “global” to the package. Is there a best practice for this kind of thing? At the moment I have some getters and setters but should I use ENV, which would a…

---

## [Get Correlation matrix from dataframe with row and column titles](https://discourse.julialang.org/t/get-correlation-matrix-from-dataframe-with-row-and-column-titles/81301)

<div class="topic-metadata">

**Author:** [@DWSchulze](https://discourse.julialang.org/u/DWSchulze)\
**Replies:** 10\
**Last updated:** [February 29, 2024, 2:21pm UTC](https://discourse.julialang.org/t/get-correlation-matrix-from-dataframe-with-row-and-column-titles/81301 "2024-02-29T14:21:49Z")

</div>

I have a dataframe and I want to get the correlation matrix with row/column titles so I know what I’m looking at. If I do this cormat = cor(Matrix(df)) There are no row/column titles. How do I get a correlation matri…

---

## [Bifurcation diagram DynamicalSystems.jl](https://discourse.julialang.org/t/bifurcation-diagram-dynamicalsystems-jl/110951)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 0\
**Last updated:** [February 29, 2024, 1:18pm UTC](https://discourse.julialang.org/t/bifurcation-diagram-dynamicalsystems-jl/110951 "2024-02-29T13:18:42Z")

</div>

Hello, I got this error after two hours of calculation ArgumentError: The interval \[a,b\] is not a bracketing interval. You need f(a) and f(b) to have different signs (f(a) \* f(b) \< 0). Consider a different bracket or tr…

---

## [Retrieve UserCuts' slack for sensitivity analysis](https://discourse.julialang.org/t/retrieve-usercuts-slack-for-sensitivity-analysis/110782)

<div class="topic-metadata">

**Author:** [@abreualexp](https://discourse.julialang.org/u/abreualexp)\
**Replies:** 4\
**Last updated:** [February 29, 2024, 11:50am UTC](https://discourse.julialang.org/t/retrieve-usercuts-slack-for-sensitivity-analysis/110782 "2024-02-29T11:50:35Z")

</div>

Settings: Julia 1.8, JuMP 1.13.0, Gurobi.jl 1.0.2 I have been trying to check which type of cuts that I included through callbacks are still active. As shown in Gurobi’s log, the initial formulation has 9010 constrain…

---

## [Multiplication of \`BitMatrix\`s for linear algebra modulo 2](https://discourse.julialang.org/t/multiplication-of-bitmatrix-s-for-linear-algebra-modulo-2/110750)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 10\
**Last updated:** [February 29, 2024, 11:23am UTC](https://discourse.julialang.org/t/multiplication-of-bitmatrix-s-for-linear-algebra-modulo-2/110750 "2024-02-29T11:23:53Z")

</div>

When dealing with matrices over \\mathbb{Z}\_2 that are enormours (e.g. of size 10^5\\times10^5), it is desirable to use implementations that minimize the allocated memory. For instance: julia\> using FiniteFields julia\> si…

---

## [Named parameters with type overloads](https://discourse.julialang.org/t/named-parameters-with-type-overloads/18860)

<div class="topic-metadata">

**Author:** [@grahamstark](https://discourse.julialang.org/u/grahamstark)\
**Replies:** 34\
**Last updated:** [February 29, 2024, 11:13am UTC](https://discourse.julialang.org/t/named-parameters-with-type-overloads/18860 "2024-02-29T11:13:07Z")

</div>

Hi, I’m relatively new to Julia. Here’s a thing that puzzles me. If you have a simple overloaded function like this: function a( x :: Float64 ) print( "Float version" ) end function a( x :: Integer ) …

---

## [CUDA.jl for particle tracking simulation](https://discourse.julialang.org/t/cuda-jl-for-particle-tracking-simulation/110906)

<div class="topic-metadata">

**Author:** [@VitorSouzaLNLS](https://discourse.julialang.org/u/VitorSouzaLNLS)\
**Replies:** 4\
**Last updated:** [February 29, 2024, 10:40am UTC](https://discourse.julialang.org/t/cuda-jl-for-particle-tracking-simulation/110906 "2024-02-29T10:40:35Z")

</div>

Im trying to implement some consolidated CPU functions for particle tracking simulations (models of synchrotron accelerators) in GPU using CUDA.jl. The goal is to be able to paralelize tracking routines. I had tried to …

---

## [Why doesn't Julia have the \`switch-case\` structure?](https://discourse.julialang.org/t/why-doesnt-julia-have-the-switch-case-structure/110936)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [February 29, 2024, 9:26am UTC](https://discourse.julialang.org/t/why-doesnt-julia-have-the-switch-case-structure/110936 "2024-02-29T09:26:58Z")

</div>

Why doesn’t Julia have the switch-case structure? Is it unnecessary, or is there a better solution?

---

## [What is a good way of applying constraints "incrementally"?](https://discourse.julialang.org/t/what-is-a-good-way-of-applying-constraints-incrementally/110890)

<div class="topic-metadata">

**Author:** [@mrys](https://discourse.julialang.org/u/mrys)\
**Replies:** 4\
**Last updated:** [February 29, 2024, 9:08am UTC](https://discourse.julialang.org/t/what-is-a-good-way-of-applying-constraints-incrementally/110890 "2024-02-29T09:08:04Z")

</div>

Let say I have the following problem to solve: x\_old = zeros(\_ndofs) for i in 1:10 func(x) = f(x, x\_old) model = Model(Ipopt.Optimizer) @variable(model, x\[1:\_ndofs\]) @objective(…

---

## [A compiler trick for performance-holic](https://discourse.julialang.org/t/a-compiler-trick-for-performance-holic/110932)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 0\
**Last updated:** [February 29, 2024, 7:35am UTC](https://discourse.julialang.org/t/a-compiler-trick-for-performance-holic/110932 "2024-02-29T07:35:44Z")

</div>

In the settings. "terminal.integrated.env.windows": {"JULIA\_LLVM\_ARGS":\<your LLVM arguments here.\>} LLVM has lots of optimization options you can toggle. Maybe if you dig hard enough, you’ll find something that makes y…

---

## [Why does "QuadGK.jl" not behave the same as "Integrals.jl with QuadGKJL()"](https://discourse.julialang.org/t/why-does-quadgk-jl-not-behave-the-same-as-integrals-jl-with-quadgkjl/110795)

<div class="topic-metadata">

**Author:** [@Laura](https://discourse.julialang.org/u/Laura)\
**Replies:** 3\
**Last updated:** [February 29, 2024, 7:08am UTC](https://discourse.julialang.org/t/why-does-quadgk-jl-not-behave-the-same-as-integrals-jl-with-quadgkjl/110795 "2024-02-29T07:08:36Z")

</div>

I am writing a program to perform a spherical Bessel transformation which requires some one dimensional integrals but I am having some trouble with the Integrals.jl package. Naturally my first attempt to do this was to …

---

## [Dispatch based on symbol parameter](https://discourse.julialang.org/t/dispatch-based-on-symbol-parameter/110849)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 15\
**Last updated:** [February 29, 2024, 5:40am UTC](https://discourse.julialang.org/t/dispatch-based-on-symbol-parameter/110849 "2024-02-29T05:40:37Z")

</div>

Is there any way to dispatch directly on a symbol function parameter? I have a function which takes a symbol and returns a different type based on a symbol that is passed into it. In order for this function to have a typ…

---

## [Differences between running in debugger and REPL?](https://discourse.julialang.org/t/differences-between-running-in-debugger-and-repl/110930)

<div class="topic-metadata">

**Author:** [@mpeters2](https://discourse.julialang.org/u/mpeters2)\
**Replies:** 0\
**Last updated:** [February 29, 2024, 3:45am UTC](https://discourse.julialang.org/t/differences-between-running-in-debugger-and-repl/110930 "2024-02-29T03:45:38Z")

</div>

Specifically, the context is within VSCode, but it might not matter. I have a function that runs correctly in the debugger, but not when chosing “Julia: Execute active File in REPL” or “Julia: Run file in New Process” …

---

## [Arithmetic for parametric type values in structs e.g., N+1](https://discourse.julialang.org/t/arithmetic-for-parametric-type-values-in-structs-e-g-n-1/110925)

<div class="topic-metadata">

**Author:** [@Abhinav\_Bhatia](https://discourse.julialang.org/u/Abhinav_Bhatia)\
**Replies:** 5\
**Last updated:** [February 29, 2024, 3:37am UTC](https://discourse.julialang.org/t/arithmetic-for-parametric-type-values-in-structs-e-g-n-1/110925 "2024-02-29T03:37:47Z")

</div>

How can I do something like: struct Foo{N} arr1::Array{Float64, N} arr2::Array{Float64, N+1} end i.e., I want arr2 to be always of 1 higher rank than arr1. How to do this?

---

## [Forward differentiation and differential equations](https://discourse.julialang.org/t/forward-differentiation-and-differential-equations/21002)

<div class="topic-metadata">

**Author:** [@moesphere](https://discourse.julialang.org/u/moesphere)\
**Replies:** 13\
**Last updated:** [November 7, 2023, 9:01am UTC](https://discourse.julialang.org/t/forward-differentiation-and-differential-equations/21002 "2023-11-07T09:01:46Z")

</div>

I am trying to use forward AD in combination with solving an ODE using DifferentialEquations.jl. I want to use an own loss function. However, with the is-in-place version there is a type assertion error. I have come up w…

---

## [Help using GraphMakie to emulate GraphRecipes plot using edge\_width and number of edges](https://discourse.julialang.org/t/help-using-graphmakie-to-emulate-graphrecipes-plot-using-edge-width-and-number-of-edges/109629)

<div class="topic-metadata">

**Author:** [@keynescoefen](https://discourse.julialang.org/u/keynescoefen)\
**Replies:** 1\
**Last updated:** [February 29, 2024, 12:20am UTC](https://discourse.julialang.org/t/help-using-graphmakie-to-emulate-graphrecipes-plot-using-edge-width-and-number-of-edges/109629 "2024-02-29T00:20:21Z")

</div>

Hello! I started using GraphMakie mostly due to this issue here: Dots in the middle of nodes · Issue #154 · JuliaPlots/GraphRecipes.jl · GitHub Dots in the middle of labels, which afaik, persists to today. I therefore …

---

## [Modeling Step function in ODEs](https://discourse.julialang.org/t/modeling-step-function-in-odes/110313)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 4\
**Last updated:** [February 29, 2024, 12:07am UTC](https://discourse.julialang.org/t/modeling-step-function-in-odes/110313 "2024-02-29T00:07:32Z")

</div>

Hi, I am modeling a stimulus that lasts for a certain amount of time. The way I model it is with a set of callback functions, e.g. ton = 0.0; toff = 2.0; stim = 10.0; function condition1(u, t, integrator) t\>=ton &&…

---

## [Lux + Turing: How to not to use a global variable for state \`st\`](https://discourse.julialang.org/t/lux-turing-how-to-not-to-use-a-global-variable-for-state-st/110878)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [February 29, 2024, 12:06am UTC](https://discourse.julialang.org/t/lux-turing-how-to-not-to-use-a-global-variable-for-state-st/110878 "2024-02-29T00:06:20Z")

</div>

Hi there, Lux state handling, while lovely explicit, seems sometimes a bit difficult. Here the example from the Bayesian Lux Tutorial # Specify the probabilistic model. @model function bayes\_nn(xs, ts) global st …

---

## [Enhancing Simulation Timing Reports with Color-Coded Outputs in Julia](https://discourse.julialang.org/t/enhancing-simulation-timing-reports-with-color-coded-outputs-in-julia/110912)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [February 28, 2024, 10:44pm UTC](https://discourse.julialang.org/t/enhancing-simulation-timing-reports-with-color-coded-outputs-in-julia/110912 "2024-02-28T22:44:55Z")

</div>

Hello all! I am currently working on a simulation project and have been using Julia’s timing functionalities to monitor the performance of various sections of my code. The timing report provides a detailed breakdown of …

---

## [Saving information to a log file](https://discourse.julialang.org/t/saving-information-to-a-log-file/110869)

<div class="topic-metadata">

**Author:** [@mpeters2](https://discourse.julialang.org/u/mpeters2)\
**Replies:** 3\
**Last updated:** [February 28, 2024, 10:02pm UTC](https://discourse.julialang.org/t/saving-information-to-a-log-file/110869 "2024-02-28T22:02:44Z")

</div>

I’m trying to debug some code that crashes Julia (yet, ironically, works perfectly fine in the debugger!). My problem is that it crashes the REPL, so I can’t see what’s going on. I went so far as to use QuickTime player…

---

## [DeepLearning.AI sees Python package management as a roadblock for AI](https://discourse.julialang.org/t/deeplearning-ai-sees-python-package-management-as-a-roadblock-for-ai/110922)

<div class="topic-metadata">

**Author:** [@cmichelenstrofer](https://discourse.julialang.org/u/cmichelenstrofer)\
**Replies:** 0\
**Last updated:** [February 28, 2024, 8:48pm UTC](https://discourse.julialang.org/t/deeplearning-ai-sees-python-package-management-as-a-roadblock-for-ai/110922 "2024-02-28T20:48:53Z")

</div>

Today’s DeepLearning.AI’s The Batch newsletter has an article about Python’s dependency management being a roadblock to AI development. No solutions are given. Maybe there’s a way to make an even stronger push for Julia …

---

## [Overlay a line plot and a heatmap in Makie.jl](https://discourse.julialang.org/t/overlay-a-line-plot-and-a-heatmap-in-makie-jl/110921)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 1\
**Last updated:** [February 28, 2024, 8:54pm UTC](https://discourse.julialang.org/t/overlay-a-line-plot-and-a-heatmap-in-makie-jl/110921 "2024-02-28T20:54:29Z")

</div>

How can I draw a heatmap in the bg and a line plot over it in Makie.jl? fig\[2, :\] = chartgrid = GridLayout(tellwidth=false) ax = Axis(chartgrid\[1, 1\]) heatmap!(ax, obc, colormap=:thermal) lineplot = lines!(ax, plot\_s…

---

## [How to efficiently skip calculating some vector elements?](https://discourse.julialang.org/t/how-to-efficiently-skip-calculating-some-vector-elements/110915)

<div class="topic-metadata">

**Author:** [@g2g](https://discourse.julialang.org/u/g2g)\
**Replies:** 4\
**Last updated:** [February 28, 2024, 8:49pm UTC](https://discourse.julialang.org/t/how-to-efficiently-skip-calculating-some-vector-elements/110915 "2024-02-28T20:49:39Z")

</div>

There are significant efficiency gains by implementing Projective Geometric Algebra (PGA) in OpenGL shader hardware as described in Steven De Keninck’s recent paper, “Look, Ma, No Matrices!” Less significant (because it…

---

## [How to access values of JuMP variables during optimization](https://discourse.julialang.org/t/how-to-access-values-of-jump-variables-during-optimization/110914)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 7\
**Last updated:** [February 28, 2024, 8:39pm UTC](https://discourse.julialang.org/t/how-to-access-values-of-jump-variables-during-optimization/110914 "2024-02-28T20:39:49Z")

</div>

Is there a way to access values of JuMP variables during the optimization? I need to use JuMP for a constrained optimization. At each iteration of the optimization, I need to access the values of the parameters (i.e., v…

---

## [Is there a way to change a single parameter in am ODEproblem and rerun it?](https://discourse.julialang.org/t/is-there-a-way-to-change-a-single-parameter-in-am-odeproblem-and-rerun-it/86775)

<div class="topic-metadata">

**Author:** [@TS-CUBED](https://discourse.julialang.org/u/TS-CUBED)\
**Replies:** 15\
**Last updated:** [February 28, 2024, 8:30pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-change-a-single-parameter-in-am-odeproblem-and-rerun-it/86775 "2024-02-28T20:30:57Z")

</div>

I do define a model with a set of parameters that comes from the default settings for the components. I then want to change a parameter and rerun the problem. I could of course set up a parameter input map p = \[ p1 =\> …

---

## [GPU problems with RecursiveArrayTools](https://discourse.julialang.org/t/gpu-problems-with-recursivearraytools/110830)

<div class="topic-metadata">

**Author:** [@agelgazzar](https://discourse.julialang.org/u/agelgazzar)\
**Replies:** 1\
**Last updated:** [February 28, 2024, 8:25pm UTC](https://discourse.julialang.org/t/gpu-problems-with-recursivearraytools/110830 "2024-02-28T20:25:29Z")

</div>

Hi, I have an system of ODEs where the state is an array of arrays. I want to be able to solve my ODE on the gpu. I am using ArrayPartition where each array is an CuArray. However, I get the scalar indexing error. The co…

---

## [Recommended way to install a Project/Manifest into the global environment](https://discourse.julialang.org/t/recommended-way-to-install-a-project-manifest-into-the-global-environment/110754)

<div class="topic-metadata">

**Author:** [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Replies:** 3\
**Last updated:** [February 28, 2024, 10:10am UTC](https://discourse.julialang.org/t/recommended-way-to-install-a-project-manifest-into-the-global-environment/110754 "2024-02-28T10:10:19Z")

</div>

If I have a project.toml and manifest.toml, is there a way I can add those packages and versions into the default environment? I know, I know… better to use project files but this is for building a reusable docker conta…

[Previous page](https://discourse.julialang.org/latest.md?page=469)

[Next page](https://discourse.julialang.org/latest.md?page=471)
