# Latest

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

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

**Page:** 431

---

## [How to get a feasible point of an arbitrary optimization model?](https://discourse.julialang.org/t/how-to-get-a-feasible-point-of-an-arbitrary-optimization-model/112513)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 8\
**Last updated:** [April 18, 2024, 7:44pm UTC](https://discourse.julialang.org/t/how-to-get-a-feasible-point-of-an-arbitrary-optimization-model/112513 "2024-04-18T19:44:10Z")

</div>

How to get a feasible point if the optimization model is not infeasible? If the model has no objective, I can do this by: using JuMP, HiGHS m = Model(HiGHS.Optimizer) @variable(m, x \<= 1) optimize!(m) value(x) But if …

---

## [Can DataFramesMeta replace dummy values for all columns of a specific type](https://discourse.julialang.org/t/can-dataframesmeta-replace-dummy-values-for-all-columns-of-a-specific-type/113149)

<div class="topic-metadata">

**Author:** [@jjAtNxtPt](https://discourse.julialang.org/u/jjAtNxtPt)\
**Replies:** 12\
**Last updated:** [April 18, 2024, 7:36pm UTC](https://discourse.julialang.org/t/can-dataframesmeta-replace-dummy-values-for-all-columns-of-a-specific-type/113149 "2024-04-18T19:36:46Z")

</div>

I’ve been trying to figure out a way to have DataFramesMet perform this operation: transform!(df2, names(df2, String) .=\> (t -\> replace(t, ""=\>missing)), renamecols=false) General: Replace dummy value for all columns …

---

## [How is copy! legal when the size of src and dst array are different?](https://discourse.julialang.org/t/how-is-copy-legal-when-the-size-of-src-and-dst-array-are-different/113151)

<div class="topic-metadata">

**Author:** [@Abhinav\_Bhatia](https://discourse.julialang.org/u/Abhinav_Bhatia)\
**Replies:** 3\
**Last updated:** [April 18, 2024, 5:06pm UTC](https://discourse.julialang.org/t/how-is-copy-legal-when-the-size-of-src-and-dst-array-are-different/113151 "2024-04-18T17:06:04Z")

</div>

How is something like this legal? x = rand(2) y = rand(3) copy!(x, y) # in-place copying should be impossible. This is somehow legal and leads to creation of a new array for x and y is then copied to x. Shouldn’t t…

---

## [Why is it consuming and not freeing GPU memory?](https://discourse.julialang.org/t/why-is-it-consuming-and-not-freeing-gpu-memory/113087)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 5\
**Last updated:** [April 18, 2024, 3:55pm UTC](https://discourse.julialang.org/t/why-is-it-consuming-and-not-freeing-gpu-memory/113087 "2024-04-18T15:55:25Z")

</div>

Hi, I’m running into something I do not understand. My simple CUDA code is taking memory all the time and not freeing it. A simple example: julia\> using CUDA julia\> CUDA.memory\_status() Effective GPU memory usage: 4.…

---

## [Power Sector Model Researcher / Maintainer, Washington DC](https://discourse.julialang.org/t/power-sector-model-researcher-maintainer-washington-dc/112422)

<div class="topic-metadata">

**Author:** [@Ethan-Russell](https://discourse.julialang.org/u/Ethan-Russell)\
**Replies:** 1\
**Last updated:** [April 18, 2024, 2:34pm UTC](https://discourse.julialang.org/t/power-sector-model-researcher-maintainer-washington-dc/112422 "2024-04-18T14:34:45Z")

</div>

Hello Julia community! My team runs and maintains the E4ST.jl (Engineering, Economic, and Environmental Electricity Simulation Tool) model, which simultaneously optimizes investment decisions and environmental outcomes …

---

## [QuadGK unexpected behavior on first degree polynomial](https://discourse.julialang.org/t/quadgk-unexpected-behavior-on-first-degree-polynomial/113134)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 2\
**Last updated:** [April 18, 2024, 2:25pm UTC](https://discourse.julialang.org/t/quadgk-unexpected-behavior-on-first-degree-polynomial/113134 "2024-04-18T14:25:34Z")

</div>

I constructed a tiny example on which my (naive?) use of the quadgk() fails. The example is a first order polynomial in x and y on the triangular domain with vertices (0,0), (1,0) and (0,1). Below a working and failing M…

---

## [Julia performance tuning for live application](https://discourse.julialang.org/t/julia-performance-tuning-for-live-application/108343)

<div class="topic-metadata">

**Author:** [@justinsgray](https://discourse.julialang.org/u/justinsgray)\
**Replies:** 2\
**Last updated:** [April 18, 2024, 2:17pm UTC](https://discourse.julialang.org/t/julia-performance-tuning-for-live-application/108343 "2024-04-18T14:17:16Z")

</div>

We are looking to contract with a Julia performance specialist who can help improve the performance of our julia based machining-AI application that powers Toolpath.com. We use julia for the main body of the app, though…

---

## [Jacobian in TangentDynamicalSystem](https://discourse.julialang.org/t/jacobian-in-tangentdynamicalsystem/113140)

<div class="topic-metadata">

**Author:** [@pclus](https://discourse.julialang.org/u/pclus)\
**Replies:** 9\
**Last updated:** [April 18, 2024, 2:13pm UTC](https://discourse.julialang.org/t/jacobian-in-tangentdynamicalsystem/113140 "2024-04-18T14:13:08Z")

</div>

This is a doubt about the definition of TangentDynamicalSystem in DynamicalSystemsBase. In the documentation it is specified the following about the Jacobian: Jacobian The keyword J provides the Jacobian function. It…

---

## [Bayesian inference with PINNs for ODEs with exogenous inputs taken from data](https://discourse.julialang.org/t/bayesian-inference-with-pinns-for-odes-with-exogenous-inputs-taken-from-data/112721)

<div class="topic-metadata">

**Author:** [@Alvaro98](https://discourse.julialang.org/u/Alvaro98)\
**Replies:** 5\
**Last updated:** [April 18, 2024, 1:57pm UTC](https://discourse.julialang.org/t/bayesian-inference-with-pinns-for-odes-with-exogenous-inputs-taken-from-data/112721 "2024-04-18T13:57:30Z")

</div>

First of all, I’m quite new to Julia and I would like to apologize if the question is too naïve, probably product of my limited understanding of how Julia handles this type of algorithms. Currently, I’m using Julia versi…

---

## [How do I implement the fastest tensor contractions](https://discourse.julialang.org/t/how-do-i-implement-the-fastest-tensor-contractions/111007)

<div class="topic-metadata">

**Author:** [@Laura](https://discourse.julialang.org/u/Laura)\
**Replies:** 11\
**Last updated:** [April 18, 2024, 1:40pm UTC](https://discourse.julialang.org/t/how-do-i-implement-the-fastest-tensor-contractions/111007 "2024-04-18T13:40:53Z")

</div>

I am writing a program which has a tensor contraction with a 4d symmetrical tensor at it’s core. Needless to say, since it will be used inside a non linear problem solver in the future, I need this tensor contraction to …

---

## [\[BoundaryValueDiffEq.jl\] Avoid recompilation](https://discourse.julialang.org/t/boundaryvaluediffeq-jl-avoid-recompilation/113131)

<div class="topic-metadata">

**Author:** [@bmxam](https://discourse.julialang.org/u/bmxam)\
**Replies:** 1\
**Last updated:** [April 18, 2024, 12:25pm UTC](https://discourse.julialang.org/t/boundaryvaluediffeq-jl-avoid-recompilation/113131 "2024-04-18T12:25:19Z")

</div>

Hi, I am trying to use the TwoPointBVPProblem from BoundaryValueDiffEq. I put my code in a file and runs it by including in the REPL. The code runs great but the first call to solve always triggers a (long) “recompilati…

---

## [Solving Delay differential equation with variable delay](https://discourse.julialang.org/t/solving-delay-differential-equation-with-variable-delay/113137)

<div class="topic-metadata">

**Author:** [@Lucas\_Sarrazin](https://discourse.julialang.org/u/Lucas_Sarrazin)\
**Replies:** 1\
**Last updated:** [April 18, 2024, 12:23pm UTC](https://discourse.julialang.org/t/solving-delay-differential-equation-with-variable-delay/113137 "2024-04-18T12:23:42Z")

</div>

Hi everyone, I am very new to Julia and I want to wrote a code for solving a delay differential equation with variable delay of the form : x’(t) = 1 + y(t) y’(t) = y(t - tau(t)) + y0 with initial conditions xi = 0 an…

---

## [Excess precompilations](https://discourse.julialang.org/t/excess-precompilations/113144)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 0\
**Last updated:** [April 18, 2024, 11:47am UTC](https://discourse.julialang.org/t/excess-precompilations/113144 "2024-04-18T11:47:51Z")

</div>

These 4 steps each one precompiles the code 1- using GMT from normal REPL 2- using GMT from VSC REPL (???) 3- \] test GMT 4- From pythoncall, jl.seval("using GMT") Looking at the .julia\\compiled\\v1.10\\GMT there are n…

---

## [Please support people from the global south to attend UN conferences](https://discourse.julialang.org/t/please-support-people-from-the-global-south-to-attend-un-conferences/111145)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [April 17, 2024, 7:25pm UTC](https://discourse.julialang.org/t/please-support-people-from-the-global-south-to-attend-un-conferences/111145 "2024-04-17T19:25:39Z")

</div>

Dear Julians, I think many of you are scientists, and we have the privilege to go to many conferences in the whole world to present our research. Not everybody has the privilege of attending international conferences, …

---

## [BLAS on CPU or GPU or both? And Randomized linear algebra](https://discourse.julialang.org/t/blas-on-cpu-or-gpu-or-both-and-randomized-linear-algebra/113142)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [April 18, 2024, 10:45am UTC](https://discourse.julialang.org/t/blas-on-cpu-or-gpu-or-both-and-randomized-linear-algebra/113142 "2024-04-18T10:45:28Z")

</div>

A. First, very intriguing, also with good background on traditional linear algebra and matmul: B. It’s intriguing you can get 10-20x speedup with randomizing, but now on what most use: Most use tradition…

---

## [Packages for Quadtrees in Julia?](https://discourse.julialang.org/t/packages-for-quadtrees-in-julia/113078)

<div class="topic-metadata">

**Author:** [@dgleich](https://discourse.julialang.org/u/dgleich)\
**Replies:** 7\
**Last updated:** [April 18, 2024, 10:36am UTC](https://discourse.julialang.org/t/packages-for-quadtrees-in-julia/113078 "2024-04-18T10:36:04Z")

</div>

I’m trying to port some the d3 graph interaction packages to Julia. (see the nascent GitHub - dgleich/GraphPlayground.jl: Really playing with graphs in Julia via an interactive Makie window. repo …) The next step in the…

---

## [Many breakthroughs: Complex-valued transformer neural networks, or even "quaternion backpropagation", or none at all? Predictive coding](https://discourse.julialang.org/t/many-breakthroughs-complex-valued-transformer-neural-networks-or-even-quaternion-backpropagation-or-none-at-all-predictive-coding/113135)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [April 18, 2024, 10:14am UTC](https://discourse.julialang.org/t/many-breakthroughs-complex-valued-transformer-neural-networks-or-even-quaternion-backpropagation-or-none-at-all-predictive-coding/113135 "2024-04-18T10:14:53Z")

</div>

\[I usually post ML stuff under in “offtopic” but I think I may get better answers/discussion here, I’m not asking for a solution to a very specific problem I have. I start with interesting practical developments then mor…

---

## [Add a colorbar to a viz in GeoStats](https://discourse.julialang.org/t/add-a-colorbar-to-a-viz-in-geostats/112193)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 24\
**Last updated:** [April 18, 2024, 9:42am UTC](https://discourse.julialang.org/t/add-a-colorbar-to-a-viz-in-geostats/112193 "2024-04-18T09:42:09Z")

</div>

How can I add a colour bar to this map in GeoStat? viz(longt.geometry, color = log10.(longt.rat), colorscheme = colorschemes\[:hawaii\], facetcolor = "black", showfacets=true) Thanks!

---

## [Flux with Metal backend slower than on CPU (Apple M2 Pro)](https://discourse.julialang.org/t/flux-with-metal-backend-slower-than-on-cpu-apple-m2-pro/113080)

<div class="topic-metadata">

**Author:** [@pat-alt](https://discourse.julialang.org/u/pat-alt)\
**Replies:** 5\
**Last updated:** [April 18, 2024, 9:40am UTC](https://discourse.julialang.org/t/flux-with-metal-backend-slower-than-on-cpu-apple-m2-pro/113080 "2024-04-18T09:40:57Z")

</div>

This might be a very silly question (so apologies in advance!), but I have found little discussion on this topic anywhere. I have yet to actually make of my Mac’s M2 GPU using Flux with the Metal.jl backend. But every t…

---

## [Matching any vector in function dispatch](https://discourse.julialang.org/t/matching-any-vector-in-function-dispatch/113075)

<div class="topic-metadata">

**Author:** [@suvayu](https://discourse.julialang.org/u/suvayu)\
**Replies:** 4\
**Last updated:** [April 18, 2024, 8:59am UTC](https://discourse.julialang.org/t/matching-any-vector-in-function-dispatch/113075 "2024-04-18T08:59:19Z")

</div>

I’m having trouble with function dispatch where I want to have two different implementations when the values in a dictionary are vectors or not These work as I would expect: function fn(val::Vector{Any}) @info "fn,…

---

## [Multithreading problems in running Julia in a Slurm cluster](https://discourse.julialang.org/t/multithreading-problems-in-running-julia-in-a-slurm-cluster/112826)

<div class="topic-metadata">

**Author:** [@maphdze](https://discourse.julialang.org/u/maphdze)\
**Replies:** 8\
**Last updated:** [April 18, 2024, 7:34am UTC](https://discourse.julialang.org/t/multithreading-problems-in-running-julia-in-a-slurm-cluster/112826 "2024-04-18T07:34:03Z")

</div>

Hi! I am confused about running Julia code in a Slurm cluster. I am solving a nonlinear PDE so I have to solve it step by step. In each step a linear equation system Ax=b (from FEM so A is sparse) is solved by \\ which …

---

## [Really simple system for exporting c++ functions to julia](https://discourse.julialang.org/t/really-simple-system-for-exporting-c-functions-to-julia/113129)

<div class="topic-metadata">

**Author:** [@Chris\_Green](https://discourse.julialang.org/u/Chris_Green)\
**Replies:** 0\
**Last updated:** [April 18, 2024, 5:46am UTC](https://discourse.julialang.org/t/really-simple-system-for-exporting-c-functions-to-julia/113129 "2024-04-18T05:46:06Z")

</div>

This simple code will get you the ability to call simple c++ functions from Julia, without any build complexity at all or any need to link anything extra into your code. Hot load/unload is also provided for interactive…

---

## [Possible to change the global RNG to a custom RNG?](https://discourse.julialang.org/t/possible-to-change-the-global-rng-to-a-custom-rng/113008)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [April 18, 2024, 5:38am UTC](https://discourse.julialang.org/t/possible-to-change-the-global-rng-to-a-custom-rng/113008 "2024-04-18T05:38:27Z")

</div>

All my (BetaML) stochastic functions accept a RNG parameter, defaulting to Random.GLOBAL\_RNG. Now, in a certain project I am ok to trade off RN production efficiency with stability and use StableRNGs, but I would like t…

---

## [Compiler recursion limit](https://discourse.julialang.org/t/compiler-recursion-limit/112698)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 10\
**Last updated:** [April 17, 2024, 11:52pm UTC](https://discourse.julialang.org/t/compiler-recursion-limit/112698 "2024-04-17T23:52:55Z")

</div>

I’ve written some recursive code that compiles away due to (I believe) constant propagation. However, I’m afraid that if I run the code on a larger problem I will hit a compiler recursion limit and it will no longer comp…

---

## [DrWatson and NamedTuples](https://discourse.julialang.org/t/drwatson-and-namedtuples/113007)

<div class="topic-metadata">

**Author:** [@wave\_and\_matter](https://discourse.julialang.org/u/wave_and_matter)\
**Replies:** 2\
**Last updated:** [April 17, 2024, 9:50pm UTC](https://discourse.julialang.org/t/drwatson-and-namedtuples/113007 "2024-04-17T21:50:51Z")

</div>

I have been using DrWatson for a project at work for months now and have found it mostly helpful. However, there is one thing I do not understand: As far as I understand, it is more efficient in many cases to use Named…

---

## [There are currently 0 solution(s) in the model](https://discourse.julialang.org/t/there-are-currently-0-solution-s-in-the-model/113072)

<div class="topic-metadata">

**Author:** [@IgorESMelo](https://discourse.julialang.org/u/IgorESMelo)\
**Replies:** 1\
**Last updated:** [April 17, 2024, 9:11pm UTC](https://discourse.julialang.org/t/there-are-currently-0-solution-s-in-the-model/113072 "2024-04-17T21:11:47Z")

</div>

Hy everyone, I’m trying to solve an allocation problem. I have two objectives: (i) maximize the shift resiliences on a planning horizon and (ii) minimize the resilience variance across the shifts. So I coded the model …

---

## [Alias two macros](https://discourse.julialang.org/t/alias-two-macros/113028)

<div class="topic-metadata">

**Author:** [@mancolric](https://discourse.julialang.org/u/mancolric)\
**Replies:** 6\
**Last updated:** [April 17, 2024, 6:57pm UTC](https://discourse.julialang.org/t/alias-two-macros/113028 "2024-04-17T18:57:21Z")

</div>

I would like to define a macro such that @mymacro expression is the same as @tturbo @. expression. Is there any way to do this? I have read the documentation and made several attempts, but I am completely new to macros a…

---

## [Makie read legend color](https://discourse.julialang.org/t/makie-read-legend-color/113076)

<div class="topic-metadata">

**Author:** [@rongcuid](https://discourse.julialang.org/u/rongcuid)\
**Replies:** 3\
**Last updated:** [April 17, 2024, 6:12pm UTC](https://discourse.julialang.org/t/makie-read-legend-color/113076 "2024-04-17T18:12:42Z")

</div>

Is it possible to read back the colors from an existing Legend, or axis?

---

## [Tick size in Plots.jl](https://discourse.julialang.org/t/tick-size-in-plots-jl/74793)

<div class="topic-metadata">

**Author:** [@Gabrielmlando](https://discourse.julialang.org/u/Gabrielmlando)\
**Replies:** 6\
**Last updated:** [April 17, 2024, 5:59pm UTC](https://discourse.julialang.org/t/tick-size-in-plots-jl/74793 "2024-04-17T17:59:48Z")

</div>

I am having a very hard time trying to increase tick size in Plots.jl using gr(). Apparently there is no documentation on this either. Is there a way to do it?

---

## [Any way to call \`getindex(v, end)\`?](https://discourse.julialang.org/t/any-way-to-call-getindex-v-end/113056)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 7\
**Last updated:** [April 17, 2024, 4:35pm UTC](https://discourse.julialang.org/t/any-way-to-call-getindex-v-end/113056 "2024-04-17T16:35:17Z")

</div>

If we have a vector v we can get the last element with v\[end\]. However that seems not to work with the equivalent getindex: julia\> v = rand(3); julia\> v\[end\]; # works julia\> getindex(v , end) #errors ERROR: ParseErro…

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

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