# Latest

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

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

**Page:** 734

---

## [Who does "better" than DataFrames?](https://discourse.julialang.org/t/who-does-better-than-dataframes/96946)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 43\
**Last updated:** [April 6, 2023, 12:55am UTC](https://discourse.julialang.org/t/who-does-better-than-dataframes/96946 "2023-04-06T00:55:25Z")

</div>

given a list of observations (simulations, trials, results) find the list of “best” results for each simulation. In the context of DataFrames, using the minilanguage, the problem is solved by calling the following funct…

---

## [KrylovKit convergence](https://discourse.julialang.org/t/krylovkit-convergence/97078)

<div class="topic-metadata">

**Author:** [@alfredmallet](https://discourse.julialang.org/u/alfredmallet)\
**Replies:** 6\
**Last updated:** [April 5, 2023, 9:56pm UTC](https://discourse.julialang.org/t/krylovkit-convergence/97078 "2023-04-05T21:56:03Z")

</div>

Hello, I have just started learning Julia, and I am attempting to use it to solve a one-dimensional eigenvalue problem in my field, plasma physics (specifically, the tearing mode, if anyone is interested). The problem i…

---

## [Avoiding mutation in time course simulations - Zygote](https://discourse.julialang.org/t/avoiding-mutation-in-time-course-simulations-zygote/97141)

<div class="topic-metadata">

**Author:** [@Bill\_Holmes](https://discourse.julialang.org/u/Bill_Holmes)\
**Replies:** 1\
**Last updated:** [April 5, 2023, 11:15pm UTC](https://discourse.julialang.org/t/avoiding-mutation-in-time-course-simulations-zygote/97141 "2023-04-05T23:15:07Z")

</div>

Hello all. Yes, this is another question about avoiding mutation when using Zygote for AD. I am working on a problem where I will eventually need to differentiate through a time dependent simulation. As a toy problem con…

---

## [Modifying a tridiagonal matrix](https://discourse.julialang.org/t/modifying-a-tridiagonal-matrix/97131)

<div class="topic-metadata">

**Author:** [@KZ-Spectra](https://discourse.julialang.org/u/KZ-Spectra)\
**Replies:** 4\
**Last updated:** [April 5, 2023, 9:54pm UTC](https://discourse.julialang.org/t/modifying-a-tridiagonal-matrix/97131 "2023-04-05T21:54:30Z")

</div>

N₁=5 # Coefficient matrix of second-order centered-difference operator (δ²u)ₙ M = Tridiagonal(fill(1,N₁-1), fill(-2,N₁), fill(1,N₁-1)); M\[N₁,1\] = 1; # Periodic boundary conditions M\[1,N₁\] = 1; results…

---

## [Porting multi-level regression with poststratification (MRP) tutorial from rstanarm](https://discourse.julialang.org/t/porting-multi-level-regression-with-poststratification-mrp-tutorial-from-rstanarm/96689)

<div class="topic-metadata">

**Author:** [@jfhawkin](https://discourse.julialang.org/u/jfhawkin)\
**Replies:** 7\
**Last updated:** [April 5, 2023, 10:15pm UTC](https://discourse.julialang.org/t/porting-multi-level-regression-with-poststratification-mrp-tutorial-from-rstanarm/96689 "2023-04-05T22:15:08Z")

</div>

I am working to port a tutorial on MRP from rstanarm to Turing. I’m also just getting started on Julia, so it’s an opportunity to learn the language at the same time. I’ve estimated a few models in Stan and have some fa…

---

## [Zero elements in sparse matrix](https://discourse.julialang.org/t/zero-elements-in-sparse-matrix/97134)

<div class="topic-metadata">

**Author:** [@Nova](https://discourse.julialang.org/u/Nova)\
**Replies:** 3\
**Last updated:** [April 5, 2023, 9:24pm UTC](https://discourse.julialang.org/t/zero-elements-in-sparse-matrix/97134 "2023-04-05T21:24:39Z")

</div>

How to find the index of zero elements in a sparse matrix efficiently? I have a matrix with a size of 200k by 200k.

---

## [Inplace mutation of DataFrame column of type Missing](https://discourse.julialang.org/t/inplace-mutation-of-dataframe-column-of-type-missing/97109)

<div class="topic-metadata">

**Author:** [@fchichorro](https://discourse.julialang.org/u/fchichorro)\
**Replies:** 3\
**Last updated:** [April 5, 2023, 9:15pm UTC](https://discourse.julialang.org/t/inplace-mutation-of-dataframe-column-of-type-missing/97109 "2023-04-05T21:15:56Z")

</div>

I am updating a CSV file by loading it as a DataFrame, loading it in memory and replacing values where I need. The minimal version of this dataset looks like this: df = CSV.File(IOBuffer("""fruit,count,verifier\\napple,2…

---

## [Formatting julia code in Pluto notebook cells?](https://discourse.julialang.org/t/formatting-julia-code-in-pluto-notebook-cells/97135)

<div class="topic-metadata">

**Author:** [@rud-lucien](https://discourse.julialang.org/u/rud-lucien)\
**Replies:** 2\
**Last updated:** [April 5, 2023, 8:50pm UTC](https://discourse.julialang.org/t/formatting-julia-code-in-pluto-notebook-cells/97135 "2023-04-05T20:50:16Z")

</div>

Hi, I have recently started using Pluto notebooks and am really enjoying it! I am having lots of fun actually! I love the reactive aspect of this notebook and also love the fact that I can bypass it when I want to by t…

---

## [Shared array between two julia sessions with different pids](https://discourse.julialang.org/t/shared-array-between-two-julia-sessions-with-different-pids/97107)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 5\
**Last updated:** [April 5, 2023, 8:18pm UTC](https://discourse.julialang.org/t/shared-array-between-two-julia-sessions-with-different-pids/97107 "2023-04-05T20:18:15Z")

</div>

Process 26012: julia\> using SharedArrays julia\> getpid() 26012 julia\> sa = SharedVector{Int}(4); Process 35208: julia\> using SharedArrays julia\> getpid() 35208 Is there an easy way to get sa from process 26012 in …

---

## [Q | Using Regex and eachmatch() to extract substrings](https://discourse.julialang.org/t/q-using-regex-and-eachmatch-to-extract-substrings/97128)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 1\
**Last updated:** [April 5, 2023, 8:06pm UTC](https://discourse.julialang.org/t/q-using-regex-and-eachmatch-to-extract-substrings/97128 "2023-04-05T20:06:45Z")

</div>

Hello, I’m using a package \[Form 4.3.0\] for symbolic code optimization that outputs results in C and have written a script to convert the code to Julia. It’s worked to-date, however, I’ve run into a new problem in rece…

---

## [Create periodic signals for simulating system response with lsim](https://discourse.julialang.org/t/create-periodic-signals-for-simulating-system-response-with-lsim/97058)

<div class="topic-metadata">

**Author:** [@lucasmsoares96](https://discourse.julialang.org/u/lucasmsoares96)\
**Replies:** 4\
**Last updated:** [April 5, 2023, 7:37pm UTC](https://discourse.julialang.org/t/create-periodic-signals-for-simulating-system-response-with-lsim/97058 "2023-04-05T19:37:35Z")

</div>

I need to generate a periodic quadratic wave to use as input to the lsim function. In Matlab I can generate this wave with the command: z = tf('z',1); H = (0.05\*(z - 1)) / (z^2 - 1.85\*z + 0.9); \[u,t\] = gensig('square',2…

---

## [Nesting \`Threads.@thread\` and \`Polyester.@batch\` (or context manager to limit Polyester threads)](https://discourse.julialang.org/t/nesting-threads-thread-and-polyester-batch-or-context-manager-to-limit-polyester-threads/84490)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 7\
**Last updated:** [April 5, 2023, 7:07pm UTC](https://discourse.julialang.org/t/nesting-threads-thread-and-polyester-batch-or-context-manager-to-limit-polyester-threads/84490 "2023-04-05T19:07:02Z")

</div>

How dangerous is it to run Polyester.@batch inside of a Threads.@thread? An example where I might need this: a library implements a low level function that uses Polyester for multithreading, and I want to run multiple s…

---

## [Adding extra objectives in JuMP](https://discourse.julialang.org/t/adding-extra-objectives-in-jump/67767)

<div class="topic-metadata">

**Author:** [@dbomahn](https://discourse.julialang.org/u/dbomahn)\
**Replies:** 3\
**Last updated:** [April 5, 2023, 6:42pm UTC](https://discourse.julialang.org/t/adding-extra-objectives-in-jump/67767 "2023-04-05T18:42:36Z")

</div>

Hello, I found that CPLEX 12.9 or later versions allow us to build a model with multiple objectives (not summing up the objectives by giving weights) and wanted to export the model to an LP file of CPLEX multi-objective…

---

## ["Codon: A high-performance, zero-overhead, extensible Python compiler using LLVM"](https://discourse.julialang.org/t/codon-a-high-performance-zero-overhead-extensible-python-compiler-using-llvm/95983)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 2\
**Last updated:** [April 5, 2023, 6:39pm UTC](https://discourse.julialang.org/t/codon-a-high-performance-zero-overhead-extensible-python-compiler-using-llvm/95983 "2023-04-05T18:39:40Z")

</div>

Paper: GitHub:

---

## [Variable undefined in for loop](https://discourse.julialang.org/t/variable-undefined-in-for-loop/97102)

<div class="topic-metadata">

**Author:** [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Replies:** 3\
**Last updated:** [April 5, 2023, 5:49pm UTC](https://discourse.julialang.org/t/variable-undefined-in-for-loop/97102 "2023-04-05T17:49:53Z")

</div>

Calculating the sum from 1 to 10: function myfunc(x) k = nothing for i = 1:10 println(k) #crashes here if isnothing(k) global k = i else global k = k + i …

---

## [Partition of distributed arrays in Julia](https://discourse.julialang.org/t/partition-of-distributed-arrays-in-julia/97122)

<div class="topic-metadata">

**Author:** [@Hana](https://discourse.julialang.org/u/Hana)\
**Replies:** 0\
**Last updated:** [April 5, 2023, 4:40pm UTC](https://discourse.julialang.org/t/partition-of-distributed-arrays-in-julia/97122 "2023-04-05T16:40:48Z")

</div>

0 my problem is to complete partition\_data(strain::AbstractArray, stress::AbstractArray) in Julia. In this function, the strain/stress arguments are Arrays that contain the entire stress and strain data only on the proc…

---

## [Can I change the latex font using LatexString package?](https://discourse.julialang.org/t/can-i-change-the-latex-font-using-latexstring-package/97113)

<div class="topic-metadata">

**Author:** [@quantum](https://discourse.julialang.org/u/quantum)\
**Replies:** 1\
**Last updated:** [April 5, 2023, 3:09pm UTC](https://discourse.julialang.org/t/can-i-change-the-latex-font-using-latexstring-package/97113 "2023-04-05T15:09:55Z")

</div>

My computer is Mac OX m1. I use the package LatexSting to render the latex. This is the code and output figure. I was wondering if I can change the font of latex. However, I don’t want to change the font of text because…

---

## [Convert GADM.jl country file to GeoJSON.jl](https://discourse.julialang.org/t/convert-gadm-jl-country-file-to-geojson-jl/82654)

<div class="topic-metadata">

**Author:** [@alasaadstat](https://discourse.julialang.org/u/alasaadstat)\
**Replies:** 8\
**Last updated:** [April 5, 2023, 2:22pm UTC](https://discourse.julialang.org/t/convert-gadm-jl-country-file-to-geojson-jl/82654 "2023-04-05T14:22:55Z")

</div>

Hi, I would like to convert the loaded GADM.jl country polygon file to GeoJSON.jl so that I can plot this using GeoMakie.jl. I am aware that MeshViz.jl supports well the GADM.jl, but I would like to customize the plot an…

---

## [Creating sparse diagonal matrix of CuArray](https://discourse.julialang.org/t/creating-sparse-diagonal-matrix-of-cuarray/97108)

<div class="topic-metadata">

**Author:** [@Hemsh94](https://discourse.julialang.org/u/Hemsh94)\
**Replies:** 0\
**Last updated:** [April 5, 2023, 9:40am UTC](https://discourse.julialang.org/t/creating-sparse-diagonal-matrix-of-cuarray/97108 "2023-04-05T09:40:42Z")

</div>

Hello everyone, If we have a vector (u), we can easily convert it into a sparse diagonal matrix using the command spdiagm(u). I want to do the same operation using CUDA where u is defined as CuArray(u). The command spd…

---

## [How to do multiply updates with Observables.jl?](https://discourse.julialang.org/t/how-to-do-multiply-updates-with-observables-jl/96936)

<div class="topic-metadata">

**Author:** [@pzabka](https://discourse.julialang.org/u/pzabka)\
**Replies:** 2\
**Last updated:** [April 5, 2023, 7:55am UTC](https://discourse.julialang.org/t/how-to-do-multiply-updates-with-observables-jl/96936 "2023-04-05T07:55:59Z")

</div>

In version 0.4 of Observables.jl, it was possible to fire several events on an update using channels. However, it disappeared from version 0.5. Is there any way how to do it now? It would be useful for making a video pla…

---

## [SMTPClient response status](https://discourse.julialang.org/t/smtpclient-response-status/97089)

<div class="topic-metadata">

**Author:** [@PRCervera](https://discourse.julialang.org/u/PRCervera)\
**Replies:** 1\
**Last updated:** [April 5, 2023, 7:14am UTC](https://discourse.julialang.org/t/smtpclient-response-status/97089 "2023-04-05T07:14:41Z")

</div>

Hi, How can I get resp status , in this funtion, to know if the email has been sending correctly? Are there any options to build similar function? Thank you !!! Julia version 1.8.5 using SMTPClient function Enviar…

---

## [How to efficiently parallelize Julia's code using the same structure across multiple cores](https://discourse.julialang.org/t/how-to-efficiently-parallelize-julias-code-using-the-same-structure-across-multiple-cores/97055)

<div class="topic-metadata">

**Author:** [@sylowii](https://discourse.julialang.org/u/sylowii)\
**Replies:** 6\
**Last updated:** [April 5, 2023, 7:05am UTC](https://discourse.julialang.org/t/how-to-efficiently-parallelize-julias-code-using-the-same-structure-across-multiple-cores/97055 "2023-04-05T07:05:25Z")

</div>

Hi all, I am trying to efficiently parallelize a code that relies on a big data structure (let’s say matrices of size 10^5 x 10^3 ). A small example is provided below. I would like to avoid creating/copying the same dat…

---

## [Pure virtual method called terminate called without an active exception](https://discourse.julialang.org/t/pure-virtual-method-called-terminate-called-without-an-active-exception/86536)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 6\
**Last updated:** [April 5, 2023, 5:25am UTC](https://discourse.julialang.org/t/pure-virtual-method-called-terminate-called-without-an-active-exception/86536 "2023-04-05T05:25:41Z")

</div>

I occasionally encounter this error on Julia v1.8 while using a code that calls Folds.map to perform a multi-threaded calculation on one node of a SLURM cluster: pure virtual method called terminate called without an ac…

---

## [Reducing model building time](https://discourse.julialang.org/t/reducing-model-building-time/97069)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 8\
**Last updated:** [April 5, 2023, 3:09am UTC](https://discourse.julialang.org/t/reducing-model-building-time/97069 "2023-04-05T03:09:51Z")

</div>

Is there a difference in the time taken to build the JuMP model if I use for loops for defining variables/constraints. For example: using JuMP model = Model() @variable(model, x\[i in 1:7, j in 1:10\] \>= 0) @constraint(…

---

## [DBInterface or MySQL.jl problem?](https://discourse.julialang.org/t/dbinterface-or-mysql-jl-problem/97084)

<div class="topic-metadata">

**Author:** [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Replies:** 2\
**Last updated:** [April 5, 2023, 2:26am UTC](https://discourse.julialang.org/t/dbinterface-or-mysql-jl-problem/97084 "2023-04-05T02:26:25Z")

</div>

Hello, When I execute two queries, the first result becomes random. Given the database: create database test; use test; create table person ( id int auto\_increment, name varchar(100), primary key (id) ); create …

---

## [Bug: Memory leak at startup?](https://discourse.julialang.org/t/bug-memory-leak-at-startup/96944)

<div class="topic-metadata">

**Author:** [@physh](https://discourse.julialang.org/u/physh)\
**Replies:** 5\
**Last updated:** [April 5, 2023, 1:12am UTC](https://discourse.julialang.org/t/bug-memory-leak-at-startup/96944 "2023-04-05T01:12:12Z")

</div>

Dear all, since a few days, I have some problems with using the “Julia Language Pack” within VCCode. Having the Extension enabled (Screenshot 1) starts to consume an unusual amount of memory. Moreover, it becomes impos…

---

## [NeuralPDE for starting a geophysics repository](https://discourse.julialang.org/t/neuralpde-for-starting-a-geophysics-repository/97047)

<div class="topic-metadata">

**Author:** [@pkmishra](https://discourse.julialang.org/u/pkmishra)\
**Replies:** 4\
**Last updated:** [April 4, 2023, 10:59pm UTC](https://discourse.julialang.org/t/neuralpde-for-starting-a-geophysics-repository/97047 "2023-04-04T22:59:28Z")

</div>

Hi @ChrisRackauckas, I am writing a research proposal for creating an integrated optimization framework for multi-source geophysical data. The goal is to start something sustainable for long-term. I would like everything…

---

## [Gradient-Free Neural Network Optimization](https://discourse.julialang.org/t/gradient-free-neural-network-optimization/97088)

<div class="topic-metadata">

**Author:** [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Replies:** 3\
**Last updated:** [April 4, 2023, 10:58pm UTC](https://discourse.julialang.org/t/gradient-free-neural-network-optimization/97088 "2023-04-04T22:58:33Z")

</div>

I have a neural network which is real valued (i.e., maps into \\mathbb{R}, with inputs in \\mathbb{R}^{n}), but it has complex weights. Consequently, taking gradients of the loss function is complex differentiation, and th…

---

## [Unexpected broadcasting behavior involving eachrow()](https://discourse.julialang.org/t/unexpected-broadcasting-behavior-involving-eachrow/96781)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 86\
**Last updated:** [April 4, 2023, 10:31pm UTC](https://discourse.julialang.org/t/unexpected-broadcasting-behavior-involving-eachrow/96781 "2023-04-04T22:31:35Z")

</div>

in the following, the result of y2 is counter-intuitive: Random.seed!(1); x = randn(6, 4); scale = (1 ./ LinearAlgebra.norm.(eachrow(x)) ); y1 = x .\* scale; y2 = copy(x); y2 .\*= (1 ./ LinearAlgebra.norm.(eachrow(y2)) …

---

## [GDAL - Write KMZ file with transparency](https://discourse.julialang.org/t/gdal-write-kmz-file-with-transparency/97087)

<div class="topic-metadata">

**Author:** [@stefanomoro](https://discourse.julialang.org/u/stefanomoro)\
**Replies:** 1\
**Last updated:** [April 4, 2023, 9:54pm UTC](https://discourse.julialang.org/t/gdal-write-kmz-file-with-transparency/97087 "2023-04-04T21:54:30Z")

</div>

I’m trying to save a .kmz file from a dataset representing a DEM of an area stored in a GeoTiff file. My code is reading the DEM, transforming the CRS to UTM, and defining a subset based on coordinates. On this subset I…

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

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