# Latest

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

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

**Page:** 692

---

## [Getter that returns all optimizer attributes](https://discourse.julialang.org/t/getter-that-returns-all-optimizer-attributes/99113)

<div class="topic-metadata">

**Author:** [@raphaelsaavedra](https://discourse.julialang.org/u/raphaelsaavedra)\
**Replies:** 2\
**Last updated:** [May 23, 2023, 12:28pm UTC](https://discourse.julialang.org/t/getter-that-returns-all-optimizer-attributes/99113 "2023-05-23T12:28:05Z")

</div>

I couldn’t find in the JuMP docs how to get all optimizer attributes from a solver. There’s the following, which allows you to get one particular attribute: get\_attribute(model::Model, attr::MOI.AbstractModelAttribute) …

---

## [HTTP hangs indefinitely for certain sites](https://discourse.julialang.org/t/http-hangs-indefinitely-for-certain-sites/98585)

<div class="topic-metadata">

**Author:** [@bhalpin](https://discourse.julialang.org/u/bhalpin)\
**Replies:** 4\
**Last updated:** [May 23, 2023, 12:26pm UTC](https://discourse.julialang.org/t/http-hangs-indefinitely-for-certain-sites/98585 "2023-05-23T12:26:40Z")

</div>

I’m using HTTP to talk to the Mastodon API, which involves connecting to many sites, many of which do not actually run the API (any more). For a very few sites (but not zero), HTTP.get() hangs, apparently indefinitely. F…

---

## [Findfirst alternative for Set](https://discourse.julialang.org/t/findfirst-alternative-for-set/99271)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 6\
**Last updated:** [May 23, 2023, 12:07pm UTC](https://discourse.julialang.org/t/findfirst-alternative-for-set/99271 "2023-05-23T12:07:36Z")

</div>

Hi there, I am wondering whether there is something similar to findfirst which does not return the index, but the matching object itself. This would be useful to work with Sets julia\> findfirst(x-\>x==1,Set(\[1,2,3\])) E…

---

## [Unclear where compatibility requirements are coming from](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 7\
**Last updated:** [May 23, 2023, 12:01pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681 "2023-05-23T12:01:05Z")

</div>

I’m trying to develop on a fork of the ForwardDiff.jl package (current master commit). When I try to add the repo to my dependencies I get the following compatibility error: (@v1.9) pkg\> dev /Users/olly/.julia/dev/Forwa…

---

## [Replace Values in a DataFrames Column with Another Value](https://discourse.julialang.org/t/replace-values-in-a-dataframes-column-with-another-value/79548)

<div class="topic-metadata">

**Author:** [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Replies:** 19\
**Last updated:** [May 23, 2023, 9:21am UTC](https://discourse.julialang.org/t/replace-values-in-a-dataframes-column-with-another-value/79548 "2023-05-23T09:21:21Z")

</div>

In my dataframe I have several columns which values are string I would like to extract those values and then doing it’s preprocessing Thnak you for your help

---

## [Make devectorized operation default?](https://discourse.julialang.org/t/make-devectorized-operation-default/99263)

<div class="topic-metadata">

**Author:** [@Haibo\_Zhao](https://discourse.julialang.org/u/Haibo_Zhao)\
**Replies:** 8\
**Last updated:** [May 23, 2023, 9:11am UTC](https://discourse.julialang.org/t/make-devectorized-operation-default/99263 "2023-05-23T09:11:26Z")

</div>

Hello, I am new to julia, and before that, I use matlab, numpy, fortran quite alot, and I find Julia is everything I need to do computational work, especially its auto-differential ecosystem. After reading some offfical…

---

## [Using a variable to format printf not allowed?](https://discourse.julialang.org/t/using-a-variable-to-format-printf-not-allowed/99200)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 9\
**Last updated:** [May 23, 2023, 8:56am UTC](https://discourse.julialang.org/t/using-a-variable-to-format-printf-not-allowed/99200 "2023-05-23T08:56:07Z")

</div>

Hi! I’m trying to write a simple text file where each line follows one of a few specific formats. Is it not permitted to use a variable to specify the format for @printf? Example: julia\> fname = "abc" "abc" julia\> @pr…

---

## [Generate structured documentation](https://discourse.julialang.org/t/generate-structured-documentation/99247)

<div class="topic-metadata">

**Author:** [@dbrohl](https://discourse.julialang.org/u/dbrohl)\
**Replies:** 6\
**Last updated:** [May 23, 2023, 8:51am UTC](https://discourse.julialang.org/t/generate-structured-documentation/99247 "2023-05-23T08:51:30Z")

</div>

I’m new to Julia and try to use different packages.I find it hard to use the documentation (when it exists). I appreachiate all descriptions and examples and everything in the docs, but I miss pages like “Here is type X …

---

## [Symbolic differential geometry on Julia](https://discourse.julialang.org/t/symbolic-differential-geometry-on-julia/56273)

<div class="topic-metadata">

**Author:** [@mlainz](https://discourse.julialang.org/u/mlainz)\
**Replies:** 5\
**Last updated:** [May 23, 2023, 8:43am UTC](https://discourse.julialang.org/t/symbolic-differential-geometry-on-julia/56273 "2023-05-23T08:43:04Z")

</div>

I like Pluto.jl reactive notebook paradigm and I miss it when I use Python for symbolic work on differential geometry. More precisely, I use the SageManifolds package. I am looking for an alternative workflow on Julia. I…

---

## [Reject requests in HTTP.jl server based on memory usage](https://discourse.julialang.org/t/reject-requests-in-http-jl-server-based-on-memory-usage/99216)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 6\
**Last updated:** [May 23, 2023, 7:59am UTC](https://discourse.julialang.org/t/reject-requests-in-http-jl-server-based-on-memory-usage/99216 "2023-05-23T07:59:16Z")

</div>

The idea is to prevent a web service to suffer memory exhaustion by rejecting requests, or react to other similar resource allocation issues based on the machine state. I suppose it can be done using the HTTP.Middleware …

---

## [Dual vs shadow price: Which one to use?](https://discourse.julialang.org/t/dual-vs-shadow-price-which-one-to-use/99260)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 8\
**Last updated:** [May 23, 2023, 7:54am UTC](https://discourse.julialang.org/t/dual-vs-shadow-price-which-one-to-use/99260 "2023-05-23T07:54:29Z")

</div>

I want to make sure I understand correctly the difference between the dual/shadow\_price returned by JuMP. Let’s consider the following primal problem: using JuMP, Gurobi begin model = Model(Gurobi.Optimizer) @va…

---

## [Update design parameter in TO](https://discourse.julialang.org/t/update-design-parameter-in-to/99242)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 1\
**Last updated:** [May 23, 2023, 7:40am UTC](https://discourse.julialang.org/t/update-design-parameter-in-to/99242 "2023-05-23T07:40:37Z")

</div>

Hi. in tutorial 18 of gridap I couldn’t understand how gridap update design density. because i have done similar but it always gives me zero and says that the matrix A is singular. can anyone explain me about the procedu…

---

## [Why do I have to install PGFPlotsX manually?](https://discourse.julialang.org/t/why-do-i-have-to-install-pgfplotsx-manually/99140)

<div class="topic-metadata">

**Author:** [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Replies:** 7\
**Last updated:** [May 23, 2023, 7:32am UTC](https://discourse.julialang.org/t/why-do-i-have-to-install-pgfplotsx-manually/99140 "2023-05-23T07:32:20Z")

</div>

After adding and importing a package that has PGFPlotsX as a dependency, and checking that the dependency has been added to my environment’s Manifest (confirmed by entering st -m in package mode), I get an error when cal…

---

## [I Want to Plot Second Derivative of Inverse Secant Function with SymPy](https://discourse.julialang.org/t/i-want-to-plot-second-derivative-of-inverse-secant-function-with-sympy/99179)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 6\
**Last updated:** [May 23, 2023, 5:47am UTC](https://discourse.julialang.org/t/i-want-to-plot-second-derivative-of-inverse-secant-function-with-sympy/99179 "2023-05-23T05:47:56Z")

</div>

Hi all, I have the formula for the first derivative for secant inverse: D\_{x} \\sec^{-1} \\ x = \\frac{1}{|x| \\sqrt{x^{2}-1}} with |x| \> 1 I can manually find the second derivative (the second is very complex). Then c…

---

## [Metalog Distributions](https://discourse.julialang.org/t/metalog-distributions/99259)

<div class="topic-metadata">

**Author:** [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Replies:** 0\
**Last updated:** [May 23, 2023, 5:16am UTC](https://discourse.julialang.org/t/metalog-distributions/99259 "2023-05-23T05:16:55Z")

</div>

Hi, I am looking to use Metalog Distributions (1 1 The Three Types of Probability Distributions - YouTube) in a project I’m working on. Are there any packages that have implemented them (including fitting to data, and …

---

## [\[Blog Post\] A Fun Exploration of Perfect, Abundant, and Deficient Numbers](https://discourse.julialang.org/t/blog-post-a-fun-exploration-of-perfect-abundant-and-deficient-numbers/99168)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 5\
**Last updated:** [May 23, 2023, 3:17am UTC](https://discourse.julialang.org/t/blog-post-a-fun-exploration-of-perfect-abundant-and-deficient-numbers/99168 "2023-05-23T03:17:58Z")

</div>

Hey folks, I recently wrote a blog post with a very small computational treatment of exploring abundant, deficient, and perfect numbers (the latter only briefly) alongside aliquot sequences. This was my first foray into…

---

## [Incorporating SVD factorization into GPUs with CUDA](https://discourse.julialang.org/t/incorporating-svd-factorization-into-gpus-with-cuda/99252)

<div class="topic-metadata">

**Author:** [@jarroyoe](https://discourse.julialang.org/u/jarroyoe)\
**Replies:** 7\
**Last updated:** [May 23, 2023, 2:31am UTC](https://discourse.julialang.org/t/incorporating-svd-factorization-into-gpus-with-cuda/99252 "2023-05-23T02:31:21Z")

</div>

I’m trying to run the following code to optimize the spectral radius of the weight matrices of a neural network: using CUDA, Random, Lux, ComponentArrays, Optimization, OptimizationOptimisers, OptimizationOptimJL, Linea…

---

## [ReverseDiff over ForwardDiff behaves strangely with Lux networks (Issue)](https://discourse.julialang.org/t/reversediff-over-forwarddiff-behaves-strangely-with-lux-networks-issue/99175)

<div class="topic-metadata">

**Author:** [@Bizzi](https://discourse.julialang.org/u/Bizzi)\
**Replies:** 3\
**Last updated:** [May 23, 2023, 2:06am UTC](https://discourse.julialang.org/t/reversediff-over-forwarddiff-behaves-strangely-with-lux-networks-issue/99175 "2023-05-23T02:06:13Z")

</div>

Hello everyone. For my work with PINNs, I am trying to use ReverseDiff to calculate the gradient of a loss function that itself contains a ForwardDiff gradient. It is easy enough to do so with explicitly-parametrized dec…

---

## [Nested parallel loops with @spawn](https://discourse.julialang.org/t/nested-parallel-loops-with-spawn/32364)

<div class="topic-metadata">

**Author:** [@mzilhao](https://discourse.julialang.org/u/mzilhao)\
**Replies:** 13\
**Last updated:** [May 22, 2023, 11:30pm UTC](https://discourse.julialang.org/t/nested-parallel-loops-with-spawn/32364 "2023-05-22T23:30:15Z")

</div>

Hi all, I’m trying to choose the best way of parallelizing my code given the the current options of @spawn and @threads. A toy model for what I’m trying to do is the following: function solve\_model\_serial!(A, Nu, Nx, N…

---

## [ABM performance tips](https://discourse.julialang.org/t/abm-performance-tips/99146)

<div class="topic-metadata">

**Author:** [@sea\_slug](https://discourse.julialang.org/u/sea_slug)\
**Replies:** 5\
**Last updated:** [May 22, 2023, 11:07pm UTC](https://discourse.julialang.org/t/abm-performance-tips/99146 "2023-05-22T23:07:17Z")

</div>

I have a mainly complete ABM built using Agents.jl (awesome package!) which functions as I want (albeit with placeholder parameters) now I am at the point I want to improve the performance of the model, but I am struggli…

---

## [\[ANN\] PkgToSoftwareBOM.jl: Generate an SBOM of your environment](https://discourse.julialang.org/t/ann-pkgtosoftwarebom-jl-generate-an-sbom-of-your-environment/99197)

<div class="topic-metadata">

**Author:** [@SamuraiAku](https://discourse.julialang.org/u/SamuraiAku)\
**Replies:** 2\
**Last updated:** [May 22, 2023, 10:13pm UTC](https://discourse.julialang.org/t/ann-pkgtosoftwarebom-jl-generate-an-sbom-of-your-environment/99197 "2023-05-22T22:13:45Z")

</div>

PkgToSoftwareBOM.jl This package produces a Software Bill of Materials (SBOM) describing your Julia environment. At this time, the SBOM produced is in the (SPDX) format. Contributions to support other SBOM formats are w…

---

## [Please, how do I remove the key from a colored bar chart? Deadline immenient, help greatly appreciated](https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248)

<div class="topic-metadata">

**Author:** [@johnabs](https://discourse.julialang.org/u/johnabs)\
**Replies:** 2\
**Last updated:** [May 22, 2023, 10:08pm UTC](https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248 "2023-05-22T22:08:07Z")

</div>

I currently have some separate data frames that aren’t particularly amenable to being combined; but I need to plot them on the same plot but with a single legend/color key. I have done so with the following code, but whe…

---

## [Printf with variable format string](https://discourse.julialang.org/t/printf-with-variable-format-string/3805)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 14\
**Last updated:** [May 22, 2023, 9:04pm UTC](https://discourse.julialang.org/t/printf-with-variable-format-string/3805 "2023-05-22T21:04:55Z")

</div>

Due to @printf being a macro, it does not accept a format string that has been passed as a variable. myvec = randn(4) n = length(myvec) outstring = "Beginning of string with some numbers: " for i = 1:n outstring = o…

---

## [DomainError](https://discourse.julialang.org/t/domainerror/99218)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 7\
**Last updated:** [May 22, 2023, 8:30pm UTC](https://discourse.julialang.org/t/domainerror/99218 "2023-05-22T20:30:41Z")

</div>

Gettign this error while inferring using turing.jl. What could be the issue ? nested task error: TaskFailedException nested task error: DomainError with -0.00024058756172958402: Exponentiation yield…

---

## [Multi-thread Variable Creation](https://discourse.julialang.org/t/multi-thread-variable-creation/93300)

<div class="topic-metadata">

**Author:** [@A\_M](https://discourse.julialang.org/u/A_M)\
**Replies:** 8\
**Last updated:** [May 22, 2023, 7:27pm UTC](https://discourse.julialang.org/t/multi-thread-variable-creation/93300 "2023-05-22T19:27:43Z")

</div>

I have a large problem; even model creation will take a long time, and I was thinking of using a thread-safe approach to speed up the process. Here is the code: using Random using JuMP using HiGHS using ThreadSafeDicts …

---

## [MLDatasets MNIST Indexing](https://discourse.julialang.org/t/mldatasets-mnist-indexing/99246)

<div class="topic-metadata">

**Author:** [@donkeysaddle](https://discourse.julialang.org/u/donkeysaddle)\
**Replies:** 0\
**Last updated:** [May 22, 2023, 7:07pm UTC](https://discourse.julialang.org/t/mldatasets-mnist-indexing/99246 "2023-05-22T19:07:49Z")

</div>

Why is it that if I look at an image from the MNIST dataset in MLDatasets as a matrix the rows and columns are switched? using MLDatasets using ImageShow trainset= MNIST(:train) A = trainset.features\[:,:,1\] So A\[1…

---

## [Create an executable from script](https://discourse.julialang.org/t/create-an-executable-from-script/99243)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 1\
**Last updated:** [May 22, 2023, 7:00pm UTC](https://discourse.julialang.org/t/create-an-executable-from-script/99243 "2023-05-22T19:00:16Z")

</div>

Googling here and there I managed to rename some .JPG files (produced, I believe, by an iphone) using the exif metadata. I have to give the script to a friend of mine who can’t install programs on his Windows PC. How c…

---

## [DiffEqFlux throws a CUDA error on installation](https://discourse.julialang.org/t/diffeqflux-throws-a-cuda-error-on-installation/99212)

<div class="topic-metadata">

**Author:** [@Vidianos](https://discourse.julialang.org/u/Vidianos)\
**Replies:** 6\
**Last updated:** [May 22, 2023, 6:52pm UTC](https://discourse.julialang.org/t/diffeqflux-throws-a-cuda-error-on-installation/99212 "2023-05-22T18:52:18Z")

</div>

Hello, I am trying to get into the SciML ecosystem and as such I installed DiffEqFlux. During installation, I get this error Blockquote DiffEqFlux \[aae7a2af-3d4f-5e19-a356-7da93b79d9d0\] │ ┌ Error: Failed to initial…

---

## [Integer overflow](https://discourse.julialang.org/t/integer-overflow/99230)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 4\
**Last updated:** [May 22, 2023, 5:35pm UTC](https://discourse.julialang.org/t/integer-overflow/99230 "2023-05-22T17:35:57Z")

</div>

How to avoid issues like integer overflow in models based on differential equations with some states values ranging from 10^12 to 10^-12 ?

---

## [Curious case of FFTW performance benchmarking](https://discourse.julialang.org/t/curious-case-of-fftw-performance-benchmarking/99215)

<div class="topic-metadata">

**Author:** [@vvbond](https://discourse.julialang.org/u/vvbond)\
**Replies:** 6\
**Last updated:** [May 22, 2023, 5:06pm UTC](https://discourse.julialang.org/t/curious-case-of-fftw-performance-benchmarking/99215 "2023-05-22T17:06:41Z")

</div>

While benchmarking FFTW’s rfft() transform, I’ve stumbled upon an interesting behaviour that I’d like to pick the collective brain about. The behaviour goes as follows: bm = @benchmark rfft(A,1) setup=(A=rand(Float32,…

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

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