# Latest

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

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

**Page:** 780

---

## [Embed static Makie 3D plots in package documentation](https://discourse.julialang.org/t/embed-static-makie-3d-plots-in-package-documentation/94713)

<div class="topic-metadata">

**Author:** [@kfrb](https://discourse.julialang.org/u/kfrb)\
**Replies:** 3\
**Last updated:** [February 16, 2023, 10:41am UTC](https://discourse.julialang.org/t/embed-static-makie-3d-plots-in-package-documentation/94713 "2023-02-16T10:41:17Z")

</div>

I would like to include 3D Plots with Axis3 in the documentation of my package. However, since interactivity for Axis3 is not yet available, I don’t want to include them interactively, but only statically. The problem: …

---

## [DataFrame with "any" vector](https://discourse.julialang.org/t/dataframe-with-any-vector/94688)

<div class="topic-metadata">

**Author:** [@MitchellWeg](https://discourse.julialang.org/u/MitchellWeg)\
**Replies:** 6\
**Last updated:** [February 16, 2023, 10:32am UTC](https://discourse.julialang.org/t/dataframe-with-any-vector/94688 "2023-02-16T10:32:05Z")

</div>

I want to dynamically create a DataFrame. This means that I don’t know the column names and values beforehand. Any\[1, "\\"I am foo\\"", 2, "\\"You are bar\\"", 3, "\\"We are foobar\\""\] And to create the DataFrame, I do: df…

---

## [Calculate the strain and stress from CSV file](https://discourse.julialang.org/t/calculate-the-strain-and-stress-from-csv-file/94711)

<div class="topic-metadata">

**Author:** [@Hana](https://discourse.julialang.org/u/Hana)\
**Replies:** 3\
**Last updated:** [February 16, 2023, 10:22am UTC](https://discourse.julialang.org/t/calculate-the-strain-and-stress-from-csv-file/94711 "2023-02-16T10:22:02Z")

</div>

I have CSV file named data.csv. I need to use the 4th column for my calculations. I built the code below but it doesn’t show the final results " strain’ and "stress’'. where can be the error? using CSV using Tables fun…

---

## [How to avoid using global variable in while scope?](https://discourse.julialang.org/t/how-to-avoid-using-global-variable-in-while-scope/94500)

<div class="topic-metadata">

**Author:** [@romantimo](https://discourse.julialang.org/u/romantimo)\
**Replies:** 11\
**Last updated:** [February 16, 2023, 9:36am UTC](https://discourse.julialang.org/t/how-to-avoid-using-global-variable-in-while-scope/94500 "2023-02-16T09:36:33Z")

</div>

In this simple example, if I need a counter for a while loop, how to avoid using global variable? Can I initialize something inside while scope? i = 0 while i \< 10 global i i += 1 k = i end

---

## [Alpine+JuMP for nonlinear integer programming problem with user-defined objective function](https://discourse.julialang.org/t/alpine-jump-for-nonlinear-integer-programming-problem-with-user-defined-objective-function/94693)

<div class="topic-metadata">

**Author:** [@PrimulaBunce](https://discourse.julialang.org/u/PrimulaBunce)\
**Replies:** 2\
**Last updated:** [February 16, 2023, 9:15am UTC](https://discourse.julialang.org/t/alpine-jump-for-nonlinear-integer-programming-problem-with-user-defined-objective-function/94693 "2023-02-16T09:15:04Z")

</div>

Hi, I am trying to use Alpine to solve an integer programming problem with a user-defined nonlinear objective function. When I run JuMP.optimize!(m) I get the following error. ERROR: type Symbol has no field head Stac…

---

## [Makie text with variable styling](https://discourse.julialang.org/t/makie-text-with-variable-styling/81666)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 13\
**Last updated:** [February 16, 2023, 6:54am UTC](https://discourse.julialang.org/t/makie-text-with-variable-styling/81666 "2023-02-16T06:54:59Z")

</div>

I’m often plotting things where I need the labels to have some styling. Particularly species names that need to be in italics, eg a y-label that’s something like “Relative abundance of E. coli” There are easy ways to s…

---

## [Solve system of non-linear equation](https://discourse.julialang.org/t/solve-system-of-non-linear-equation/94706)

<div class="topic-metadata">

**Author:** [@Students](https://discourse.julialang.org/u/Students)\
**Replies:** 4\
**Last updated:** [February 16, 2023, 6:26am UTC](https://discourse.julialang.org/t/solve-system-of-non-linear-equation/94706 "2023-02-16T06:26:34Z")

</div>

Hello, I am trying to find the stationary point (gradient g(x) = 0) of this func: I am new to Julia! I understand that I should use NLsolve package to solve system of nonlinear eq. Could you please tell me how to tak…

---

## [Library loading failure when using Ipopt through JuMP](https://discourse.julialang.org/t/library-loading-failure-when-using-ipopt-through-jump/94695)

<div class="topic-metadata">

**Author:** [@zornsllama](https://discourse.julialang.org/u/zornsllama)\
**Replies:** 3\
**Last updated:** [February 16, 2023, 4:51am UTC](https://discourse.julialang.org/t/library-loading-failure-when-using-ipopt-through-jump/94695 "2023-02-16T04:51:12Z")

</div>

Hi, Until today, I was having no issues using Ipopt through JuMP. Today, however, when I run optimize!(model), I get the following error: Exception of type: DYNAMIC\_LIBRARY\_FAILURE in file "Common/IpLibraryLoader.cpp" …

---

## [Mosek does not support an objective function of type ScalarQuadraticFunction](https://discourse.julialang.org/t/mosek-does-not-support-an-objective-function-of-type-scalarquadraticfunction/94702)

<div class="topic-metadata">

**Author:** [@A\_M](https://discourse.julialang.org/u/A_M)\
**Replies:** 3\
**Last updated:** [February 16, 2023, 4:46am UTC](https://discourse.julialang.org/t/mosek-does-not-support-an-objective-function-of-type-scalarquadraticfunction/94702 "2023-02-16T04:46:58Z")

</div>

I am getting this error when I use a quadratic term in the objective while using Mosek. The solver does not support an objective function of type MathOptInterface.ScalarQuadraticFunction{Float64}. Is this something tha…

---

## [How to create agents with rigid shape](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666)

<div class="topic-metadata">

**Author:** [@John\_Thomas](https://discourse.julialang.org/u/John_Thomas)\
**Replies:** 7\
**Last updated:** [February 16, 2023, 2:25am UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666 "2023-02-16T02:25:07Z")

</div>

Hello, recently I try to simulate the random walk movement of human cells. I need to make agents(cells) with certain radius and they have to move randomly. I want the cells to not overlap in their respective radii as t…

---

## [Types and Memory allocation in the operation of Vector{Matrix{ComplexF64}}](https://discourse.julialang.org/t/types-and-memory-allocation-in-the-operation-of-vector-matrix-complexf64/94672)

<div class="topic-metadata">

**Author:** [@J\_I](https://discourse.julialang.org/u/J_I)\
**Replies:** 9\
**Last updated:** [February 16, 2023, 12:34am UTC](https://discourse.julialang.org/t/types-and-memory-allocation-in-the-operation-of-vector-matrix-complexf64/94672 "2023-02-16T00:34:52Z")

</div>

Hi, now, I’m calculating the time evolution of Vector{Matrix{ComplexF64}} by Runge-Kutta method, and I have problems regarding the calculation below:: ρ += (h/6)\*(k1 + 2\*k2 + 2\*k3 + k4) here, k1~k4, are Vector{Matrix{C…

---

## [How to speed up value updating in an array?](https://discourse.julialang.org/t/how-to-speed-up-value-updating-in-an-array/94650)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 19\
**Last updated:** [February 15, 2023, 9:56pm UTC](https://discourse.julialang.org/t/how-to-speed-up-value-updating-in-an-array/94650 "2023-02-15T21:56:55Z")

</div>

Hello! I am running a code I wrote to find the nearest neighbours between some points. Benchmarking my current version of the code and using @profview I found that what is taking the longest time now, is not computation…

---

## [High performance data structure for use in image modelling](https://discourse.julialang.org/t/high-performance-data-structure-for-use-in-image-modelling/94621)

<div class="topic-metadata">

**Author:** [@evanderveer](https://discourse.julialang.org/u/evanderveer)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 9:33pm UTC](https://discourse.julialang.org/t/high-performance-data-structure-for-use-in-image-modelling/94621 "2023-02-15T21:33:02Z")

</div>

Hi there, I am writing some code which fits a model consisting of two-dimensional gaussian functions to an image. At the moment, I am using a mutable struct which holds the information about the model as well as a vecto…

---

## [Weird behavior for input of special symbols in the Julia REPL under (K)ubuntu Linux](https://discourse.julialang.org/t/weird-behavior-for-input-of-special-symbols-in-the-julia-repl-under-k-ubuntu-linux/94655)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 4\
**Last updated:** [February 15, 2023, 9:21pm UTC](https://discourse.julialang.org/t/weird-behavior-for-input-of-special-symbols-in-the-julia-repl-under-k-ubuntu-linux/94655 "2023-02-15T21:21:59Z")

</div>

Hi, I have a weird behavior, under my Julia REPL, in my desktop machine running Julia version 1.8.3 under Kubuntu Linux 22.04.1 LTS. The terminal I use is the default Konsole and I am able to input, under Julia REPL, s…

---

## [Multiple keys for one value](https://discourse.julialang.org/t/multiple-keys-for-one-value/94696)

<div class="topic-metadata">

**Author:** [@ossan05](https://discourse.julialang.org/u/ossan05)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 7:38pm UTC](https://discourse.julialang.org/t/multiple-keys-for-one-value/94696 "2023-02-15T19:38:41Z")

</div>

Is it there a way to assign multiple keys to a value in a dictionary?

---

## [Broadcasting setindex! is a noobtrap](https://discourse.julialang.org/t/broadcasting-setindex-is-a-noobtrap/94700)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 7:32pm UTC](https://discourse.julialang.org/t/broadcasting-setindex-is-a-noobtrap/94700 "2023-02-15T19:32:27Z")

</div>

Here’s a simple (slightly oversimplified) example about why broadcasting combined with setindex is really difficult. Suppose we want to allow indexing of some custom matrix type, but we want it to be under a type hierar…

---

## [Start GLMakie visualization in previous position with previous size](https://discourse.julialang.org/t/start-glmakie-visualization-in-previous-position-with-previous-size/94132)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 12\
**Last updated:** [February 15, 2023, 6:20pm UTC](https://discourse.julialang.org/t/start-glmakie-visualization-in-previous-position-with-previous-size/94132 "2023-02-15T18:20:32Z")

</div>

Is there a way to control where will GLMakie position the freshly invoked visualization in my system ? Currently I am running Debian 11 and whenever I invoke GLMakie the visualization appears behind the current REPL ter…

---

## [Why a package (Pluto here) can precompile twice in \`add\` and \`using\`?](https://discourse.julialang.org/t/why-a-package-pluto-here-can-precompile-twice-in-add-and-using/94699)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 0\
**Last updated:** [February 15, 2023, 5:53pm UTC](https://discourse.julialang.org/t/why-a-package-pluto-here-can-precompile-twice-in-add-and-using/94699 "2023-02-15T17:53:37Z")

</div>

Here is the example. I just created an empty new environment. Then add Pluto to it, which triggered precompilation. The next command using Pluto triggered precompilation again. Why this can happen? I’ve seen this sort o…

---

## [Sort keys of NamedTuple](https://discourse.julialang.org/t/sort-keys-of-namedtuple/94630)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 5\
**Last updated:** [February 15, 2023, 5:41pm UTC](https://discourse.julialang.org/t/sort-keys-of-namedtuple/94630 "2023-02-15T17:41:20Z")

</div>

I would like to sort a NamedTuple alphabetically by its keys. For instance: (b=1, a=2, c=3) ---\> (a=2, b=1, c=3) (a=1, c=2, b=3) ---\> (a=1, b=3, c=2) I am pretty sure such functionality already exists, where to look fo…

---

## [Is there a smarter way to evaluate an float power?](https://discourse.julialang.org/t/is-there-a-smarter-way-to-evaluate-an-float-power/93330)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 27\
**Last updated:** [February 15, 2023, 5:00pm UTC](https://discourse.julialang.org/t/is-there-a-smarter-way-to-evaluate-an-float-power/93330 "2023-02-15T17:00:18Z")

</div>

Hello! Suppose I have this expression: V = rand(10^5) G = 1/7 @benchmark $V .^ $G BenchmarkTools.Trial: 1871 samples with 1 evaluation. Range (min … max): 2.282 ms … 7.797 ms ┊ GC (min … max): 0.00% … 65.35% Tim…

---

## [DICOM series: Reading, Manipulation and Visualization](https://discourse.julialang.org/t/dicom-series-reading-manipulation-and-visualization/93851)

<div class="topic-metadata">

**Author:** [@AvinashKotla](https://discourse.julialang.org/u/AvinashKotla)\
**Replies:** 1\
**Last updated:** [February 15, 2023, 4:41pm UTC](https://discourse.julialang.org/t/dicom-series-reading-manipulation-and-visualization/93851 "2023-02-15T16:41:16Z")

</div>

I have a DICOM image series generated from Micro CT scanning. How does one read the series, store the intensity values in a 3D matrix so that data manipulation is possible? var = dcmdir\_parse(“/path/to/dicom/folder/”); …

---

## [Flux benchmark being too slow vs Jax](https://discourse.julialang.org/t/flux-benchmark-being-too-slow-vs-jax/91608)

<div class="topic-metadata">

**Author:** [@krestomantsi](https://discourse.julialang.org/u/krestomantsi)\
**Replies:** 11\
**Last updated:** [February 15, 2023, 4:18pm UTC](https://discourse.julialang.org/t/flux-benchmark-being-too-slow-vs-jax/91608 "2023-02-15T16:18:14Z")

</div>

Hello everyone. I wanted to benchmark Flux vs Jax so I created this basic example. The tldr is that the Flux version (posted below) takes about 40-50 seconds on an nvidia A6000 (compilation excluded). The exact same arch…

---

## [How to efficiently multiply every matrix in a vector of matrices by another vector?](https://discourse.julialang.org/t/how-to-efficiently-multiply-every-matrix-in-a-vector-of-matrices-by-another-vector/94661)

<div class="topic-metadata">

**Author:** [@Yolo\_Tolo](https://discourse.julialang.org/u/Yolo_Tolo)\
**Replies:** 3\
**Last updated:** [February 15, 2023, 4:05pm UTC](https://discourse.julialang.org/t/how-to-efficiently-multiply-every-matrix-in-a-vector-of-matrices-by-another-vector/94661 "2023-02-15T16:05:42Z")

</div>

I have a vector of matrices t and another vector v: t = \[rand(10, 10) for \_ in 1:3\] v = rand(10) I want to multiply every matrix in t by v. I do it like this: res = \[t\_i \* v for t\_i in t\] but it’s executed slowly (an…

---

## [Optional testing files in pacakge?](https://discourse.julialang.org/t/optional-testing-files-in-pacakge/94657)

<div class="topic-metadata">

**Author:** [@lntricate](https://discourse.julialang.org/u/lntricate)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 4:03pm UTC](https://discourse.julialang.org/t/optional-testing-files-in-pacakge/94657 "2023-02-15T16:03:48Z")

</div>

Hello, I have made a small package for reading and writing a particular file type, and I would like to provide some sample testing files to run unit tests on. However, it seems suboptimal to have them downloaded with the…

---

## [Problem-using-smtpclient - send](https://discourse.julialang.org/t/problem-using-smtpclient-send/94692)

<div class="topic-metadata">

**Author:** [@Vishwas\_Reddy](https://discourse.julialang.org/u/Vishwas_Reddy)\
**Replies:** 0\
**Last updated:** [February 15, 2023, 3:55pm UTC](https://discourse.julialang.org/t/problem-using-smtpclient-send/94692 "2023-02-15T15:55:02Z")

</div>

opt = SendOptions( isSSL = true, username = "xyz@gmail.com", passwd = "\*\*\*" ) url = "smtp.freesmtpservers.com:25" subject = "SMPTClient.jl" message = "Don't f…

---

## [How to synchronize and share data correctly between processes in a loop?](https://discourse.julialang.org/t/how-to-synchronize-and-share-data-correctly-between-processes-in-a-loop/94553)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 12\
**Last updated:** [February 15, 2023, 3:15pm UTC](https://discourse.julialang.org/t/how-to-synchronize-and-share-data-correctly-between-processes-in-a-loop/94553 "2023-02-15T15:15:53Z")

</div>

I am practicing to make my real code work on parallel. My challenge is in the relation between the threads and the main process. To make it clear, I am putting the serial code func\_series(), which solves a linear equatio…

---

## [Why does this broadcast operation require specialization for optimal performance?](https://discourse.julialang.org/t/why-does-this-broadcast-operation-require-specialization-for-optimal-performance/94547)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 7\
**Last updated:** [February 15, 2023, 3:08pm UTC](https://discourse.julialang.org/t/why-does-this-broadcast-operation-require-specialization-for-optimal-performance/94547 "2023-02-15T15:08:00Z")

</div>

julia\> g1(f, x, y, z) = (y .= f.(x, z); y); julia\> g2(f, x, y, z) = (broadcast!(f, y, x, z); y); julia\> g3(f::F, x, y, z) where {F} = (y .= f.(x, z); y); julia\> x = rand(100); y = zeros(100); z = rand(100); julia\> @b…

---

## [How to use different terminals for different scripts in the same folder](https://discourse.julialang.org/t/how-to-use-different-terminals-for-different-scripts-in-the-same-folder/94686)

<div class="topic-metadata">

**Author:** [@brunbjerg](https://discourse.julialang.org/u/brunbjerg)\
**Replies:** 0\
**Last updated:** [February 15, 2023, 2:21pm UTC](https://discourse.julialang.org/t/how-to-use-different-terminals-for-different-scripts-in-the-same-folder/94686 "2023-02-15T14:21:27Z")

</div>

Hello I am developing two things simultaneously where one has a long runtime. In the meanwhile I would like to code on a different script, but when doing so both scripts try to run on the same terminal. Is there a way …

---

## [Phd & PostDoc positions at the Quantum Group at Ghent University, Belgium](https://discourse.julialang.org/t/phd-postdoc-positions-at-the-quantum-group-at-ghent-university-belgium/94684)

<div class="topic-metadata">

**Author:** [@juthohaegeman](https://discourse.julialang.org/u/juthohaegeman)\
**Replies:** 0\
**Last updated:** [February 15, 2023, 1:54pm UTC](https://discourse.julialang.org/t/phd-postdoc-positions-at-the-quantum-group-at-ghent-university-belgium/94684 "2023-02-15T13:54:38Z")

</div>

While not explicitly mentioned in the description, people interested in developing and researching tensor network algorithms using Julia are encouraged to apply:

---

## [Flux with AMD GPU(s)?](https://discourse.julialang.org/t/flux-with-amd-gpu-s/85218)

<div class="topic-metadata">

**Author:** [@johnbb](https://discourse.julialang.org/u/johnbb)\
**Replies:** 34\
**Last updated:** [February 15, 2023, 1:09pm UTC](https://discourse.julialang.org/t/flux-with-amd-gpu-s/85218 "2023-02-15T13:09:03Z")

</div>

Has anyone used Flux with an AMD GPU? I will be involved in a project that likely will be using the LUMI supercomputer in Finland which is based on AMD.

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

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