# Latest

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

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

**Page:** 193

---

## [Retrieving CRS from vector and raster data](https://discourse.julialang.org/t/retrieving-crs-from-vector-and-raster-data/107903)

<div class="topic-metadata">

**Author:** [@Bojas](https://discourse.julialang.org/u/Bojas)\
**Replies:** 7\
**Last updated:** [April 1, 2025, 2:15pm UTC](https://discourse.julialang.org/t/retrieving-crs-from-vector-and-raster-data/107903 "2025-04-01T14:15:00Z")

</div>

Hello, I’m new to Julia, as for now I was using mainly Python. What I want to do is to crop part of raster based on polygon. Both polygon and raster are in different spatial references and I have to convert either one of…

---

## [Julia has two sisters... AI "reasoning". Something to laugh about today](https://discourse.julialang.org/t/julia-has-two-sisters-ai-reasoning-something-to-laugh-about-today/127489)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 12\
**Last updated:** [April 1, 2025, 1:42pm UTC](https://discourse.julialang.org/t/julia-has-two-sisters-ai-reasoning-something-to-laugh-about-today/127489 "2025-04-01T13:42:42Z")

</div>

---

## [Naming elements in a Matrix](https://discourse.julialang.org/t/naming-elements-in-a-matrix/127553)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 9\
**Last updated:** [April 1, 2025, 12:11pm UTC](https://discourse.julialang.org/t/naming-elements-in-a-matrix/127553 "2025-04-01T12:11:56Z")

</div>

I find this usage interesting (see the second to last julia\>) julia\> a = (b = 1; c = 2); julia\> a, b, c (2, 1, 2) julia\> a = (d = 3, e = 4) (d = 3, e = 4) julia\> @isdefined(d) || @isdefined(e) false julia\> f = \[d=3,…

---

## [Plots.jl: how to savefig the plot that VSCode displays](https://discourse.julialang.org/t/plots-jl-how-to-savefig-the-plot-that-vscode-displays/127545)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 6\
**Last updated:** [April 1, 2025, 11:52am UTC](https://discourse.julialang.org/t/plots-jl-how-to-savefig-the-plot-that-vscode-displays/127545 "2025-04-01T11:52:04Z")

</div>

When I plot a figure (with Plots/GR) in VSCode, I get this: Now if I try to save it with savefig, I get: The saved figure does not correspond to the one VSCode displays. I tried saving the figure in different for…

---

## [How to properly implement Heatmap efficiently?](https://discourse.julialang.org/t/how-to-properly-implement-heatmap-efficiently/127582)

<div class="topic-metadata">

**Author:** [@matyaspayn](https://discourse.julialang.org/u/matyaspayn)\
**Replies:** 9\
**Last updated:** [April 1, 2025, 11:28am UTC](https://discourse.julialang.org/t/how-to-properly-implement-heatmap-efficiently/127582 "2025-04-01T11:28:22Z")

</div>

I am currently trying to visualise a solution to a set of differential equations, where u is my solution, and though my code works the running of the heatmap to visualise it takes at least 200 seconds each time. It shoul…

---

## [How to properly generate a function based on a condition?](https://discourse.julialang.org/t/how-to-properly-generate-a-function-based-on-a-condition/127573)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 13\
**Last updated:** [April 1, 2025, 11:17am UTC](https://discourse.julialang.org/t/how-to-properly-generate-a-function-based-on-a-condition/127573 "2025-04-01T11:17:55Z")

</div>

Hello! I have some pseudo code from a package I am working on: function GenerateOutputKernelValues(SimMetaData) flag = SimMetaData.FlagOutputKernelValues if flag # Return a func…

---

## [Optim finite differences use a vectorized version](https://discourse.julialang.org/t/optim-finite-differences-use-a-vectorized-version/127047)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 3\
**Last updated:** [April 1, 2025, 8:08am UTC](https://discourse.julialang.org/t/optim-finite-differences-use-a-vectorized-version/127047 "2025-04-01T08:08:07Z")

</div>

Hi, I’m in an optimization setting where I have to minimize a function f, where I have a “vector version” and a “matrix version” of the function “f” such that “calling the vector version N times” is typically slower than…

---

## [Parameter fitting for a multi-domain PDE](https://discourse.julialang.org/t/parameter-fitting-for-a-multi-domain-pde/127538)

<div class="topic-metadata">

**Author:** [@Anish\_Kumar](https://discourse.julialang.org/u/Anish_Kumar)\
**Replies:** 2\
**Last updated:** [April 1, 2025, 7:53am UTC](https://discourse.julialang.org/t/parameter-fitting-for-a-multi-domain-pde/127538 "2025-04-01T07:53:40Z")

</div>

Hi all, I am trying to solve a system of reaction diffusion reaction equation on two different scale - one at a macro scale and one at micro scale. The micro-scale model receives conc as Dirichlet BC from the macro-scal…

---

## [\[ANN\] AlgebraOfGraphics v0.10 (and v0.9 & v0.8)](https://discourse.julialang.org/t/ann-algebraofgraphics-v0-10-and-v0-9-v0-8/127511)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 8\
**Last updated:** [April 1, 2025, 7:01am UTC](https://discourse.julialang.org/t/ann-algebraofgraphics-v0-10-and-v0-9-v0-8/127511 "2025-04-01T07:01:39Z")

</div>

I noticed I didn’t make posts for the last two versions either, so I’m going to catch up a bit here. If you have tried AoG more than a year ago and found it lacking for your needs, maybe now’s a good time to have another…

---

## [Makie - Defining legend output for a makie recipe](https://discourse.julialang.org/t/makie-defining-legend-output-for-a-makie-recipe/121567)

<div class="topic-metadata">

**Author:** [@sc-dyer](https://discourse.julialang.org/u/sc-dyer)\
**Replies:** 4\
**Last updated:** [March 31, 2025, 10:28pm UTC](https://discourse.julialang.org/t/makie-defining-legend-output-for-a-makie-recipe/121567 "2025-03-31T22:28:53Z")

</div>

Hi, I have a makie recipe that essentially makes a stacked line graph using the band function. A very simplified example of what this looks like is this: function Makie.plot!(myplot::MyPlot) band!(myplot,myplot.x,0,…

---

## [Why \_removing\_ unused variables makes ipopt taking longer?](https://discourse.julialang.org/t/why-removing-unused-variables-makes-ipopt-taking-longer/127541)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [March 31, 2025, 8:22pm UTC](https://discourse.julialang.org/t/why-removing-unused-variables-makes-ipopt-taking-longer/127541 "2025-03-31T20:22:08Z")

</div>

I have a model that was originally global and making it multi-regional, I transformed all my variables adding a regional dimension, created the equivalent “global” version for each of them defined mostly as the sum, test…

---

## [The best way(s) to encode binary type parameter choices](https://discourse.julialang.org/t/the-best-way-s-to-encode-binary-type-parameter-choices/127434)

<div class="topic-metadata">

**Author:** [@brainandforce](https://discourse.julialang.org/u/brainandforce)\
**Replies:** 9\
**Last updated:** [March 31, 2025, 8:06pm UTC](https://discourse.julialang.org/t/the-best-way-s-to-encode-binary-type-parameter-choices/127434 "2025-03-31T20:06:42Z")

</div>

Say I have a parametric type Foo{B} and I want to restrict B to two possible values. I can think of a couple of ways to do this: Have B take on a Boolean value and use an assertion in the inner constructor to verify th…

---

## [How to make the Optim.jl zero allocated?](https://discourse.julialang.org/t/how-to-make-the-optim-jl-zero-allocated/126375)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 1\
**Last updated:** [March 31, 2025, 6:27pm UTC](https://discourse.julialang.org/t/how-to-make-the-optim-jl-zero-allocated/126375 "2025-03-31T18:27:28Z")

</div>

Hi guys, Right now I am using Optim.jl to optimise my problem, however, @btime shows the whole script has around hundreds allocations…which is quite a lot. So is there any trick to reduce the allocations to zero? and al…

---

## [Using @filter of Tidier package inside a function](https://discourse.julialang.org/t/using-filter-of-tidier-package-inside-a-function/127540)

<div class="topic-metadata">

**Author:** [@Alf](https://discourse.julialang.org/u/Alf)\
**Replies:** 3\
**Last updated:** [March 31, 2025, 5:48pm UTC](https://discourse.julialang.org/t/using-filter-of-tidier-package-inside-a-function/127540 "2025-03-31T17:48:00Z")

</div>

Hi! I rencently discovered the package Tidier, but I having trouble to use it inside a function. For instance, using AlgebraOfGraphics using DataFrames # Example function that filters a DataFrame \`df\` for rows where t…

---

## [Function for directly getting minimum/maximum value of set?](https://discourse.julialang.org/t/function-for-directly-getting-minimum-maximum-value-of-set/127559)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [March 31, 2025, 4:48pm UTC](https://discourse.julialang.org/t/function-for-directly-getting-minimum-maximum-value-of-set/127559 "2025-03-31T16:48:08Z")

</div>

Something I do somewhat frequently, do figured I should check if there is an easy way. If I have a set s, is there something equivalent to function get\_span(s) return (minimum(s), maximum(s)) end ?

---

## [Incorrect location of an error when the line is terminated by semicolon](https://discourse.julialang.org/t/incorrect-location-of-an-error-when-the-line-is-terminated-by-semicolon/127548)

<div class="topic-metadata">

**Author:** [@merement](https://discourse.julialang.org/u/merement)\
**Replies:** 2\
**Last updated:** [March 31, 2025, 3:28pm UTC](https://discourse.julialang.org/t/incorrect-location-of-an-error-when-the-line-is-terminated-by-semicolon/127548 "2025-03-31T15:28:36Z")

</div>

Possible bug? In the code, a = 1 b ::Dict{String =\> String} = Dict(); Julia reports an error in line 1. More precisely, in the previously executed line. Without the semicolon after Dict(), the error is correctly repor…

---

## [When is it worth it to setup a database rather than to just organize the data into files?](https://discourse.julialang.org/t/when-is-it-worth-it-to-setup-a-database-rather-than-to-just-organize-the-data-into-files/127539)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 2\
**Last updated:** [March 31, 2025, 2:30pm UTC](https://discourse.julialang.org/t/when-is-it-worth-it-to-setup-a-database-rather-than-to-just-organize-the-data-into-files/127539 "2025-03-31T14:30:38Z")

</div>

I’m building a library of example spectra for chemical analysis and I’m wondering what the benefits would be to setting up a database in mySQL or something with these spectra rather than just having files in folders with…

---

## [Move colorbar to the center of figure using Makie](https://discourse.julialang.org/t/move-colorbar-to-the-center-of-figure-using-makie/127456)

<div class="topic-metadata">

**Author:** [@dk-zen](https://discourse.julialang.org/u/dk-zen)\
**Replies:** 5\
**Last updated:** [March 31, 2025, 12:39pm UTC](https://discourse.julialang.org/t/move-colorbar-to-the-center-of-figure-using-makie/127456 "2025-03-31T12:39:08Z")

</div>

Hello everyone! I want to put the colorbar at the center of figure using Makie. How can I get it? The result I want just likes this:

---

## [Make fastmath use optional in a package](https://discourse.julialang.org/t/make-fastmath-use-optional-in-a-package/127527)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 3\
**Last updated:** [March 31, 2025, 11:47am UTC](https://discourse.julialang.org/t/make-fastmath-use-optional-in-a-package/127527 "2025-03-31T11:47:47Z")

</div>

Suppose that I write a package in which I would like to give the user the option to use fast math inside the package, but not necessarily elsewhere. What would be the best way of accomplishing that? The following is on…

---

## [Question about Artifact Storage on the Julia Storage Server](https://discourse.julialang.org/t/question-about-artifact-storage-on-the-julia-storage-server/127536)

<div class="topic-metadata">

**Author:** [@mkh](https://discourse.julialang.org/u/mkh)\
**Replies:** 0\
**Last updated:** [March 31, 2025, 8:04am UTC](https://discourse.julialang.org/t/question-about-artifact-storage-on-the-julia-storage-server/127536 "2025-03-31T08:04:00Z")

</div>

Hi, I’m new to Julia package development. I’m interested in developing a package similar to Bash’s command-not-found, but for Julia. In my initial design, the package would include a platform-independent dataset stored …

---

## [Poll: do you know the expression problem in programming languages](https://discourse.julialang.org/t/poll-do-you-know-the-expression-problem-in-programming-languages/127535)

<div class="topic-metadata">

**Author:** [@mitiemannn](https://discourse.julialang.org/u/mitiemannn)\
**Replies:** 0\
**Last updated:** [March 31, 2025, 8:00am UTC](https://discourse.julialang.org/t/poll-do-you-know-the-expression-problem-in-programming-languages/127535 "2025-03-31T08:00:59Z")

</div>

Hi, I’m working on a little something and I require some community feedback: poll Hopefully, the results will turn into a talk at JuliaCon 2026 or a blog post or something similar. Thanks for your participation!

---

## [Add an "optimize\_assert\_optimal" functionality in JuMP would be handier?](https://discourse.julialang.org/t/add-an-optimize-assert-optimal-functionality-in-jump-would-be-handier/124458)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 5\
**Last updated:** [March 31, 2025, 2:33am UTC](https://discourse.julialang.org/t/add-an-optimize-assert-optimal-functionality-in-jump-would-be-handier/124458 "2025-03-31T02:33:56Z")

</div>

Compared with the current “is\_solved\_and\_feasible” functionality, I think the one suggested in the title would be more convenient sometimes. In practice ((Mi)LP context particularly), we almostly certainly want our mode…

---

## [Determine date range given year and week number](https://discourse.julialang.org/t/determine-date-range-given-year-and-week-number/93878)

<div class="topic-metadata">

**Author:** [@isentropic](https://discourse.julialang.org/u/isentropic)\
**Replies:** 14\
**Last updated:** [March 30, 2025, 10:25pm UTC](https://discourse.julialang.org/t/determine-date-range-given-year-and-week-number/93878 "2025-03-30T22:25:50Z")

</div>

How can I get the date range (or just the Date of the Monday) of that week? For example, I have year = 2023 week=5, somehow I need to know that the Monday of that week is 2023-01-30. Using a relevant contructor from Da…

---

## [Facing problem writing code of heat equation](https://discourse.julialang.org/t/facing-problem-writing-code-of-heat-equation/127524)

<div class="topic-metadata">

**Author:** [@Stayal](https://discourse.julialang.org/u/Stayal)\
**Replies:** 0\
**Last updated:** [March 30, 2025, 8:37pm UTC](https://discourse.julialang.org/t/facing-problem-writing-code-of-heat-equation/127524 "2025-03-30T20:37:19Z")

</div>

Hello everyone I am a beginner in Gridap. I try to write heat equation code but it shows error using Gridap import Gridap: ∇ using Printf phi(x) = x\[1\]\*(1 - x\[1\]) \* x\[2\]\*(1 - x\[2\]) u\_ex(x, t) = t^2 \* phi(x) f(x, t) = …

---

## [ANN: seeking feedback on experimental support for vector-valued user-defined functions](https://discourse.julialang.org/t/ann-seeking-feedback-on-experimental-support-for-vector-valued-user-defined-functions/127523)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 0\
**Last updated:** [March 30, 2025, 8:12pm UTC](https://discourse.julialang.org/t/ann-seeking-feedback-on-experimental-support-for-vector-valued-user-defined-functions/127523 "2025-03-30T20:12:10Z")

</div>

Dear all, a fairly common feature request is for vector-valued user defined functions. Ipopt.jl v1.8.0 adds experimental support for Ipopt.\_VectorNonlinearOracle. Please see this issue for example usage and future plans…

---

## [Difference between pkg REPL and julia -e 'using Pkg; Pkg.\[some command\]'?](https://discourse.julialang.org/t/difference-between-pkg-repl-and-julia-e-using-pkg-pkg-some-command/127519)

<div class="topic-metadata">

**Author:** [@luc-spec](https://discourse.julialang.org/u/luc-spec)\
**Replies:** 6\
**Last updated:** [March 30, 2025, 7:22pm UTC](https://discourse.julialang.org/t/difference-between-pkg-repl-and-julia-e-using-pkg-pkg-some-command/127519 "2025-03-30T19:22:11Z")

</div>

From what I understand, there are a couple of ways to install a package with Julia. the pkg REPL (julia, then the \] key, then add \[SomePkg\]) \`julia -e ‘using Pkg; Pkg.add(“\[SomePkg\]”)’ I’m working with a custom packag…

---

## [Can I query is\_continuous about a JuMP model?](https://discourse.julialang.org/t/can-i-query-is-continuous-about-a-jump-model/127484)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 6\
**Last updated:** [March 30, 2025, 7:16pm UTC](https://discourse.julialang.org/t/can-i-query-is-continuous-about-a-jump-model/127484 "2025-03-30T19:16:50Z")

</div>

We can learn from the print(model) (🍅) that if a model has a variable which is not purely continuous (e.g. Integer/binary/semi~). julia\> model A JuMP Model ├ solver: Gurobi ├ objective\_sense: FEASIBILITY\_SENSE ├ num\_var…

---

## [Consulting hours for fixing a PackageCompiler CUDA problem in Colab](https://discourse.julialang.org/t/consulting-hours-for-fixing-a-packagecompiler-cuda-problem-in-colab/126975)

<div class="topic-metadata">

**Author:** [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Replies:** 2\
**Last updated:** [March 30, 2025, 7:10pm UTC](https://discourse.julialang.org/t/consulting-hours-for-fixing-a-packagecompiler-cuda-problem-in-colab/126975 "2025-03-30T19:10:56Z")

</div>

I can pay consulting hours for anyone who can fix my issue: CUDA app by PackageCompiler hangs at runtime on Ubuntu / Debian · Issue #1026 · JuliaLang/PackageCompiler.jl · GitHub Can extend into part time devops / deploy…

---

## [DiffEqArrayOperator is missing](https://discourse.julialang.org/t/diffeqarrayoperator-is-missing/127500)

<div class="topic-metadata">

**Author:** [@ultimatile](https://discourse.julialang.org/u/ultimatile)\
**Replies:** 3\
**Last updated:** [March 30, 2025, 4:42pm UTC](https://discourse.julialang.org/t/diffeqarrayoperator-is-missing/127500 "2025-03-30T16:42:08Z")

</div>

The code below is an example code taken from Problem Types / Non-autonomous Linear ODE / Lie Group Problems section in documentation of DifferentialEquations.jl (I cannot include the link). using DifferentialEquations f…

---

## [Counter-intuitive performance difference](https://discourse.julialang.org/t/counter-intuitive-performance-difference/127477)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 7\
**Last updated:** [March 30, 2025, 4:35pm UTC](https://discourse.julialang.org/t/counter-intuitive-performance-difference/127477 "2025-03-30T16:35:14Z")

</div>

julia\> using BenchmarkTools julia\> for i=1000 A=randn(2i,2i) vA=@view A\[1:i,1:i\] C=randn(i,i) @btime @. $C+=$vA end 1.325 ms (0 allocations: 0 bytes) julia\> for i=10…

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

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