# Latest

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

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

**Page:** 954

---

## [Gtk window appears in the background](https://discourse.julialang.org/t/gtk-window-appears-in-the-background/85725)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [August 14, 2022, 12:39pm UTC](https://discourse.julialang.org/t/gtk-window-appears-in-the-background/85725 "2022-08-14T12:39:43Z")

</div>

I want to ccall the following Gtk function: Gtk.Window.set\_keep\_above void gtk\_window\_set\_keep\_above ( GtkWindow\* window, gboolean setting ) I looked at Gtk.jl/windows.jl at master · JuliaGraphics/Gtk.jl · GitHub f…

---

## [Agents.elastic\_collision!() makes ageents move faster and faster](https://discourse.julialang.org/t/agents-elastic-collision-makes-ageents-move-faster-and-faster/84740)

<div class="topic-metadata">

**Author:** [@Wen-Wei\_Tseng](https://discourse.julialang.org/u/Wen-Wei_Tseng)\
**Replies:** 1\
**Last updated:** [August 14, 2022, 12:18pm UTC](https://discourse.julialang.org/t/agents-elastic-collision-makes-ageents-move-faster-and-faster/84740 "2022-08-14T12:18:41Z")

</div>

I tried replicating the results of social distancing example in Agents.jl Example Zoo. And the agents (balls) moved faster and faster in the output video. I was using Julia 1.8.0-rc3 (I’ve tried Julia 1.7.3, but the res…

---

## [Divide plot into boxes](https://discourse.julialang.org/t/divide-plot-into-boxes/85715)

<div class="topic-metadata">

**Author:** [@Mahmoud](https://discourse.julialang.org/u/Mahmoud)\
**Replies:** 1\
**Last updated:** [August 14, 2022, 11:56am UTC](https://discourse.julialang.org/t/divide-plot-into-boxes/85715 "2022-08-14T11:56:52Z")

</div>

I use this code to distribute points over a grid in the first photo Npopulations = 10000 Person = \[Dict("x" =\> 0,"y" =\> 0,"color" =\> "white","timecounter" =\> 0) for i ∈ 1:Npopulations\] yincrement = 0 for ipop in …

---

## [Make Base.unique work with user-defined types](https://discourse.julialang.org/t/make-base-unique-work-with-user-defined-types/85716)

<div class="topic-metadata">

**Author:** [@Lewis\_Hein](https://discourse.julialang.org/u/Lewis_Hein)\
**Replies:** 1\
**Last updated:** [August 13, 2022, 8:30pm UTC](https://discourse.julialang.org/t/make-base-unique-work-with-user-defined-types/85716 "2022-08-13T20:30:47Z")

</div>

I am trying to make Base.unique work with an array of a custom type. A really trivial example might look like this import Base.isequal struct TestStruct x::String end Base.isequal(t1::TestStruct, t2::TestStruct) = len…

---

## [How to compute a conditional sum of a vector efficiently](https://discourse.julialang.org/t/how-to-compute-a-conditional-sum-of-a-vector-efficiently/85699)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 2\
**Last updated:** [August 13, 2022, 11:53am UTC](https://discourse.julialang.org/t/how-to-compute-a-conditional-sum-of-a-vector-efficiently/85699 "2022-08-13T11:53:35Z")

</div>

I have three vectors x, a, b. I need a new vector Y which has as its k^{th} element the following sum: Y^{}\_k = \\sum\_{i=1}^N x\_i \\ \\mathbb{1}(a\_i=a\_k, b\_i=b\_k) i.e., the sum of x from all rows with the same values of a,…

---

## [VSCode REPL randomly loses connection](https://discourse.julialang.org/t/vscode-repl-randomly-loses-connection/85710)

<div class="topic-metadata">

**Author:** [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Replies:** 1\
**Last updated:** [August 13, 2022, 5:44pm UTC](https://discourse.julialang.org/t/vscode-repl-randomly-loses-connection/85710 "2022-08-13T17:44:14Z")

</div>

Starting today, every few minutes I get this popup error message in the VSCode Julia REPL pane: Usually it requires me to quit and restart VSCode to continue working. I haven’t figured out how to reproduce this error.…

---

## [Tullio without product](https://discourse.julialang.org/t/tullio-without-product/85708)

<div class="topic-metadata">

**Author:** [@qwerty](https://discourse.julialang.org/u/qwerty)\
**Replies:** 1\
**Last updated:** [August 13, 2022, 5:13pm UTC](https://discourse.julialang.org/t/tullio-without-product/85708 "2022-08-13T17:13:26Z")

</div>

How can I replace the \* with a function? @tullio c := a\[i\]\*b\[i\] a is an array of symbolic differential and b is an array of symbolic functions. I would like to get: a\[1\](b\[1\])+a\[2\](b\[2\]) Thank you

---

## [PyCall Holoviews output in Jupyter notebook](https://discourse.julialang.org/t/pycall-holoviews-output-in-jupyter-notebook/85707)

<div class="topic-metadata">

**Author:** [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Replies:** 1\
**Last updated:** [August 13, 2022, 3:36pm UTC](https://discourse.julialang.org/t/pycall-holoviews-output-in-jupyter-notebook/85707 "2022-08-13T15:36:35Z")

</div>

Is it possible to get the pyviz stack working with PyCall in a Jupyter notebook? using PyCall hv = pyimport("holoviews") hv.extension("bokeh" ) t=range(-1,1,10) hv.Curve((t,t .^ 2)) currently yields PyObject :Curve \[…

---

## [Custom Venn Diagram in Julia](https://discourse.julialang.org/t/custom-venn-diagram-in-julia/85696)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 1\
**Last updated:** [August 13, 2022, 2:07pm UTC](https://discourse.julialang.org/t/custom-venn-diagram-in-julia/85696 "2022-08-13T14:07:40Z")

</div>

Hi all, I saw this topic: But I want to plot a custom venn diagram in Julia, which can show :slight\_smile: 𝐴∩𝐵 𝐴∖𝐵 𝐴△𝐵 (symmetric difference of sets A and B which you can imagine like two blocks and the sets is not…

---

## [PkgTemplates without git](https://discourse.julialang.org/t/pkgtemplates-without-git/85703)

<div class="topic-metadata">

**Author:** [@ay\_m](https://discourse.julialang.org/u/ay_m)\
**Replies:** 1\
**Last updated:** [August 13, 2022, 1:53pm UTC](https://discourse.julialang.org/t/pkgtemplates-without-git/85703 "2022-08-13T13:53:08Z")

</div>

hello, I am trying to create a module using PkgTemplates.jl tpl = Template(user="a", dir=".") tpl("Package") The issue is this command creates a .git file, and I don’t need it, since I already have a repository created…

---

## [How can I create a linux distribution package for a julia package?](https://discourse.julialang.org/t/how-can-i-create-a-linux-distribution-package-for-a-julia-package/85656)

<div class="topic-metadata">

**Author:** [@amano](https://discourse.julialang.org/u/amano)\
**Replies:** 6\
**Last updated:** [August 13, 2022, 1:19pm UTC](https://discourse.julialang.org/t/how-can-i-create-a-linux-distribution-package-for-a-julia-package/85656 "2022-08-13T13:19:52Z")

</div>

I barely know anything about julia, but I may want to learn julia if it’s possible for me to create linux distribution packages for julia packages. It seems to involve JULIA\_DEPOT\_PATH. But, I don’t really know. Is it …

---

## [Reusing an optimization problem](https://discourse.julialang.org/t/reusing-an-optimization-problem/85694)

<div class="topic-metadata">

**Author:** [@cmarcotte](https://discourse.julialang.org/u/cmarcotte)\
**Replies:** 3\
**Last updated:** [August 13, 2022, 1:14pm UTC](https://discourse.julialang.org/t/reusing-an-optimization-problem/85694 "2022-08-13T13:14:09Z")

</div>

In Optimization.jl, we make an OptimizationProblem and solve it using an optimizer – is there any way to reuse the OptimizationProblem, like remake! in DifferentialEquations.jl? The idea would be to seamlessly chain mult…

---

## [Type issue with captured variables -\> let workaround failed](https://discourse.julialang.org/t/type-issue-with-captured-variables-let-workaround-failed/85661)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 3\
**Last updated:** [August 13, 2022, 6:59am UTC](https://discourse.julialang.org/t/type-issue-with-captured-variables-let-workaround-failed/85661 "2022-08-13T06:59:30Z")

</div>

Hi! I’m aware of #15276 but today I encountered an issue in the proposed workaround. using FFTW function f(x) p = plan\_fft(x) x\_ft = p \* x # given workaround in performance tips g = let p = p …

---

## [Help with the locks](https://discourse.julialang.org/t/help-with-the-locks/85692)

<div class="topic-metadata">

**Author:** [@lucasmsoares96](https://discourse.julialang.org/u/lucasmsoares96)\
**Replies:** 3\
**Last updated:** [August 13, 2022, 4:35am UTC](https://discourse.julialang.org/t/help-with-the-locks/85692 "2022-08-13T04:35:26Z")

</div>

Hello guys! I am not able to make the example in the documentation about lock work. cont = Int(0) lk = ReentrantLock() @threads for i in 1:100 lock(lk) try cont +=1 finally unlock(lk) end…

---

## [How to Restore resized images to original size](https://discourse.julialang.org/t/how-to-restore-resized-images-to-original-size/85695)

<div class="topic-metadata">

**Author:** [@momo1](https://discourse.julialang.org/u/momo1)\
**Replies:** 0\
**Last updated:** [August 13, 2022, 4:27am UTC](https://discourse.julialang.org/t/how-to-restore-resized-images-to-original-size/85695 "2022-08-13T04:27:09Z")

</div>

Hi, I’ve an image (extracted from pointcloud) which I’ve resized for UNet training. I used the following to resize all dataset’s images and target images img\_square = imresize(img\_source, (400, 400)); I’m not sure how …

---

## [Error with Bayesian Gaussian Process "PosDefException: matrix is not positive definite; Cholesky factorization failed."](https://discourse.julialang.org/t/error-with-bayesian-gaussian-process-posdefexception-matrix-is-not-positive-definite-cholesky-factorization-failed/85683)

<div class="topic-metadata">

**Author:** [@vickiluv](https://discourse.julialang.org/u/vickiluv)\
**Replies:** 2\
**Last updated:** [August 13, 2022, 3:57am UTC](https://discourse.julialang.org/t/error-with-bayesian-gaussian-process-posdefexception-matrix-is-not-positive-definite-cholesky-factorization-failed/85683 "2022-08-13T03:57:04Z")

</div>

I got the error of “PosDefException” when trying Bayesian Gaussian Process in Turing.jl. The Bayesian framework looks as follows @model function GP\_μ(μ, D; cov\_fn::Function=exp\_cov\_fn) n\_station = length(μ) # w…

---

## [Q: FiniteDifferences | gradient of a 3D scalar array](https://discourse.julialang.org/t/q-finitedifferences-gradient-of-a-3d-scalar-array/64065)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 5\
**Last updated:** [August 13, 2022, 2:05am UTC](https://discourse.julialang.org/t/q-finitedifferences-gradient-of-a-3d-scalar-array/64065 "2022-08-13T02:05:53Z")

</div>

Hello, I have a 3D array consisting of numerical scalar values: imgVlm::Array{Float64, 3} The grid spacing along each axis is uniform, but the spacing values are different for each axis. FiniteDifferences seems to be…

---

## [Import/using double dot in IntervalArithmetic?](https://discourse.julialang.org/t/import-using-double-dot-in-intervalarithmetic/85677)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 1\
**Last updated:** [August 12, 2022, 10:54pm UTC](https://discourse.julialang.org/t/import-using-double-dot-in-intervalarithmetic/85677 "2022-08-12T22:54:22Z")

</div>

My code currently uses both Makie/CairoMakie and the IntervalArithmetic package, and I used the a..b quite a lot in the calculation part of the code to define intervals. Problem is, on a fresh start of julia, using Cair…

---

## [Is it possible to define a macro in one line (one-liner macros)?](https://discourse.julialang.org/t/is-it-possible-to-define-a-macro-in-one-line-one-liner-macros/85649)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 8\
**Last updated:** [August 12, 2022, 10:45pm UTC](https://discourse.julialang.org/t/is-it-possible-to-define-a-macro-in-one-line-one-liner-macros/85649 "2022-08-12T22:45:49Z")

</div>

We have one-liner functions, can we define macros in one line? Like @my(x) = :(println($(esc(x)))) which is equivalent to macro my(x) :(println($(esc(x)))) end I guess not, because sometimes = is part of the macr…

---

## [Reveal all of the attributes of a current plot](https://discourse.julialang.org/t/reveal-all-of-the-attributes-of-a-current-plot/85670)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 1\
**Last updated:** [August 12, 2022, 9:24pm UTC](https://discourse.julialang.org/t/reveal-all-of-the-attributes-of-a-current-plot/85670 "2022-08-12T21:24:14Z")

</div>

How can I reveal the values of all of the attributes of a current plot? plotattr() shows me the attributes that a plot may have, but I can’t figure out if it can tell me the attributes of a current plot. I have a plot, …

---

## [Article about Multiple Dispatch](https://discourse.julialang.org/t/article-about-multiple-dispatch/76855)

<div class="topic-metadata">

**Author:** [@djpasseyjr](https://discourse.julialang.org/u/djpasseyjr)\
**Replies:** 7\
**Last updated:** [August 12, 2022, 9:19pm UTC](https://discourse.julialang.org/t/article-about-multiple-dispatch/76855 "2022-08-12T21:19:16Z")

</div>

Wow, I’d really like to improve the article. I hope that the article is a useful Julia tutorial, and I’d like to preserve the good aspects of it but it sounds like I was doing some damage. I made some small changes to …

---

## [Why does plots.jl need all these windows dependencies?](https://discourse.julialang.org/t/why-does-plots-jl-need-all-these-windows-dependencies/85679)

<div class="topic-metadata">

**Author:** [@machineman](https://discourse.julialang.org/u/machineman)\
**Replies:** 0\
**Last updated:** [August 12, 2022, 8:56pm UTC](https://discourse.julialang.org/t/why-does-plots-jl-need-all-these-windows-dependencies/85679 "2022-08-12T20:56:51Z")

</div>

I get Edge devtools for maybe webview but why “CloudExperienceHost” and such? (process:11748): GLib-GIO-WARNING \*\*: 22:49:31.901: Failed to open application manifest \`C:\\Windows\\SystemApps\\Microsoft.Windows.CloudExperie…

---

## [How to take the 3D fft of a vector?](https://discourse.julialang.org/t/how-to-take-the-3d-fft-of-a-vector/85669)

<div class="topic-metadata">

**Author:** [@Nic\_Leblanc](https://discourse.julialang.org/u/Nic_Leblanc)\
**Replies:** 8\
**Last updated:** [August 12, 2022, 6:22pm UTC](https://discourse.julialang.org/t/how-to-take-the-3d-fft-of-a-vector/85669 "2022-08-12T18:22:44Z")

</div>

Hi all, I was wondering if there were a way to take the 3D fft of a vector. I am obviously using FFTW for my direct fft calculations using plans but I’m not sure for it to calculate the 3D fft and not just a 1D fft. The…

---

## [How to group/color lines per ID in Makie?](https://discourse.julialang.org/t/how-to-group-color-lines-per-id-in-makie/85622)

<div class="topic-metadata">

**Author:** [@aelmokadem](https://discourse.julialang.org/u/aelmokadem)\
**Replies:** 8\
**Last updated:** [August 12, 2022, 6:06pm UTC](https://discourse.julialang.org/t/how-to-group-color-lines-per-id-in-makie/85622 "2022-08-12T18:06:31Z")

</div>

Hi all. I am using CairoMakie.jl to plot a figure for longitudinal theophylline concentration data in 12 subjects simultaneously. The code I am using is Theoph = dataset("datasets", "Theoph") f = Figure() Axis(f\[1,1\]) C…

---

## [1000x1000 heatmap with pyplot() won't render in VS Code plots pane](https://discourse.julialang.org/t/1000x1000-heatmap-with-pyplot-wont-render-in-vs-code-plots-pane/85671)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 0\
**Last updated:** [August 12, 2022, 5:25pm UTC](https://discourse.julialang.org/t/1000x1000-heatmap-with-pyplot-wont-render-in-vs-code-plots-pane/85671 "2022-08-12T17:25:02Z")

</div>

using Plots pyplot() @time heatmap(rand(1,1)) @time heatmap(rand(10,10)) @time heatmap(rand(100,100)) @time heatmap(rand(1000,1000)) Each takes up to a handful of milliseconds to run, but the 1k x 1k grid simply won’t r…

---

## [Creating multidimensional arrays](https://discourse.julialang.org/t/creating-multidimensional-arrays/85630)

<div class="topic-metadata">

**Author:** [@LeN3rd](https://discourse.julialang.org/u/LeN3rd)\
**Replies:** 15\
**Last updated:** [August 12, 2022, 4:13pm UTC](https://discourse.julialang.org/t/creating-multidimensional-arrays/85630 "2022-08-12T16:13:22Z")

</div>

Hey everyone, i am fairly new to Julia and i am feeling like taking crazy pills. I am coming from numpy/tensorflow and all i want to do is to create a test array with size (1,3) and tile it in the first dimension by 300,…

---

## [Update input argument in each Optim.jl iteration](https://discourse.julialang.org/t/update-input-argument-in-each-optim-jl-iteration/85641)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 7\
**Last updated:** [August 12, 2022, 3:45pm UTC](https://discourse.julialang.org/t/update-input-argument-in-each-optim-jl-iteration/85641 "2022-08-12T15:45:15Z")

</div>

How can I update the input argument such that in each iteration step n\>1, the value of b equals the value of b\_sol from the n-1th iteration? I present here the optimization call I am making. I was hoping that b would up…

---

## [A error happened when using command-line options, such as "--version"](https://discourse.julialang.org/t/a-error-happened-when-using-command-line-options-such-as-version/85663)

<div class="topic-metadata">

**Author:** [@Aesth\_Estheticism](https://discourse.julialang.org/u/Aesth_Estheticism)\
**Replies:** 2\
**Last updated:** [August 12, 2022, 3:34pm UTC](https://discourse.julialang.org/t/a-error-happened-when-using-command-line-options-such-as-version/85663 "2022-08-12T15:34:29Z")

</div>

How to use Julia command-line options, for example, I wanted to check the version of Julia using --version, however, it was not worked.

---

## [What is "JRUN\_CLUSTER\_COOKIE" error from initialisecluster() (JuliaRunClient)](https://discourse.julialang.org/t/what-is-jrun-cluster-cookie-error-from-initialisecluster-juliarunclient/85651)

<div class="topic-metadata">

**Author:** [@le\_ackerman](https://discourse.julialang.org/u/le_ackerman)\
**Replies:** 7\
**Last updated:** [August 12, 2022, 2:33pm UTC](https://discourse.julialang.org/t/what-is-jrun-cluster-cookie-error-from-initialisecluster-juliarunclient/85651 "2022-08-12T14:33:08Z")

</div>

I was going through tutorial notebooks on parallelisations and encountered this. What does this mean? the same error is for initParallel() also.

---

## [Can we use Openslide or do we have a tool to open MRXS files from microscope?](https://discourse.julialang.org/t/can-we-use-openslide-or-do-we-have-a-tool-to-open-mrxs-files-from-microscope/79936)

<div class="topic-metadata">

**Author:** [@YitaoCai](https://discourse.julialang.org/u/YitaoCai)\
**Replies:** 17\
**Last updated:** [August 12, 2022, 2:16pm UTC](https://discourse.julialang.org/t/can-we-use-openslide-or-do-we-have-a-tool-to-open-mrxs-files-from-microscope/79936 "2022-08-12T14:16:23Z")

</div>

I was thinking if there is a way we can open MRXS file in Julia, like Openslide in Python? I tried to install openslide using CondaPkg.jl, but when using PythonCall.jl to import openslide, it does not work. (it works f…

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

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