# Latest

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

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

**Page:** 1357

---

## [Call C Function that takes NULL as an argument](https://discourse.julialang.org/t/call-c-function-that-takes-null-as-an-argument/62039)

<div class="topic-metadata">

**Author:** [@rwalters31](https://discourse.julialang.org/u/rwalters31)\
**Replies:** 16\
**Last updated:** [June 18, 2021, 7:56pm UTC](https://discourse.julialang.org/t/call-c-function-that-takes-null-as-an-argument/62039 "2021-06-18T19:56:39Z")

</div>

I am trying to have my Julia code communicate with an external program. The external program provides a C API for the inter-process communications. The documentation is a bit sparse but it says: “Call flc\_attach(NULL,…

---

## [No luck with WGLMakie in IJulia](https://discourse.julialang.org/t/no-luck-with-wglmakie-in-ijulia/63151)

<div class="topic-metadata">

**Author:** [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)\
**Replies:** 2\
**Last updated:** [June 18, 2021, 7:10pm UTC](https://discourse.julialang.org/t/no-luck-with-wglmakie-in-ijulia/63151 "2021-06-18T19:10:51Z")

</div>

I’m hoping to get basic interactive plots (e.g., manipulation of 3D axes) in IJulia. But following the basic instructions in the docs has not worked on both linux and MacOS. I’m using Julia 1.6, running IJulia.notebook(…

---

## [Artifact hash mismatch when installing libpng (Julia 1.6.1)](https://discourse.julialang.org/t/artifact-hash-mismatch-when-installing-libpng-julia-1-6-1/61766)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 36\
**Last updated:** [June 18, 2021, 6:30pm UTC](https://discourse.julialang.org/t/artifact-hash-mismatch-when-installing-libpng-julia-1-6-1/61766 "2021-06-18T18:30:32Z")

</div>

During today I have tried several times to update Julia and I receive the following alert: up Updating registry at \`C:\\Users\\Hermesr\\.julia\\registries\\General\` Updating git-repo \`C:\\Users\\Hermesr\\Documents\\Git…

---

## [Alignment of printing of test set results with verbose=true](https://discourse.julialang.org/t/alignment-of-printing-of-test-set-results-with-verbose-true/63150)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 0\
**Last updated:** [June 18, 2021, 5:33pm UTC](https://discourse.julialang.org/t/alignment-of-printing-of-test-set-results-with-verbose-true/63150 "2021-06-18T17:33:52Z")

</div>

Is it possible to get the alignment of printing for test set results to line up when using @testset verbose=true ? When using @testset verbose=true ... with three nested test sets, I’m getting printing like this: Test …

---

## [CUDA with IJulia results in unexpected errors](https://discourse.julialang.org/t/cuda-with-ijulia-results-in-unexpected-errors/56917)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 7\
**Last updated:** [June 18, 2021, 4:56pm UTC](https://discourse.julialang.org/t/cuda-with-ijulia-results-in-unexpected-errors/56917 "2021-06-18T16:56:33Z")

</div>

Hey, I’m observing a strange bug. The code base is quite large and therefore I couldn’t really break it down. But what I observe: Calling my complex function (4D CUDA Arrays, FFT) the first time, results in this error…

---

## [Export jupyter to .jl does not preserve markdown cells](https://discourse.julialang.org/t/export-jupyter-to-jl-does-not-preserve-markdown-cells/57556)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 7\
**Last updated:** [June 18, 2021, 4:32pm UTC](https://discourse.julialang.org/t/export-jupyter-to-jl-does-not-preserve-markdown-cells/57556 "2021-06-18T16:32:33Z")

</div>

Hi, this is a problem that I’m constantly facing… I usually develop my Julia code in jupyter (as per the IJulia package). When my codes get a usable form, I export them as .jl files (with the Export functionality in jup…

---

## [Make a variable as a global variable within a function](https://discourse.julialang.org/t/make-a-variable-as-a-global-variable-within-a-function/63067)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 21\
**Last updated:** [June 18, 2021, 3:29pm UTC](https://discourse.julialang.org/t/make-a-variable-as-a-global-variable-within-a-function/63067 "2021-06-18T15:29:14Z")

</div>

I’d like to specify a key that acts as a global variable only within the function. For example, function my\_func(x, y) @log x # will be saved as \`my\_dict\[:x\] = x\` end function my\_func2(x) my\_dict = Dict() …

---

## [Pairwise computation slower than Python (Cython) code (BallTree very slow!)](https://discourse.julialang.org/t/pairwise-computation-slower-than-python-cython-code-balltree-very-slow/62273)

<div class="topic-metadata">

**Author:** [@florpi](https://discourse.julialang.org/u/florpi)\
**Replies:** 27\
**Last updated:** [June 18, 2021, 3:08pm UTC](https://discourse.julialang.org/t/pairwise-computation-slower-than-python-cython-code-balltree-very-slow/62273 "2021-06-18T15:08:07Z")

</div>

Hi everyone ! I’m new to Julia, and so far have found it very nice and neat. However, my Julia implementation is still slower than the python one I was trying to beat. The goal is to compute the mean radial pairwise vel…

---

## [How do I recreate excel's index match function in Julia?](https://discourse.julialang.org/t/how-do-i-recreate-excels-index-match-function-in-julia/63144)

<div class="topic-metadata">

**Author:** [@Mitch](https://discourse.julialang.org/u/Mitch)\
**Replies:** 2\
**Last updated:** [June 18, 2021, 3:00pm UTC](https://discourse.julialang.org/t/how-do-i-recreate-excels-index-match-function-in-julia/63144 "2021-06-18T15:00:31Z")

</div>

Hey, thanks for the help! I need to match the rows from column x in dataframe two, with the correct rows in data frame 1 to form a new column. The problem is visually described and solved in Python in the link below. I…

---

## [Interactive FFT with an intervalslider in Makie](https://discourse.julialang.org/t/interactive-fft-with-an-intervalslider-in-makie/63112)

<div class="topic-metadata">

**Author:** [@Flausi](https://discourse.julialang.org/u/Flausi)\
**Replies:** 3\
**Last updated:** [June 18, 2021, 1:52pm UTC](https://discourse.julialang.org/t/interactive-fft-with-an-intervalslider-in-makie/63112 "2021-06-18T13:52:18Z")

</div>

Hello, I have taken a relatively large amount of readings over time and would now like to look at them in detail. For this purpose I use an interval slider in Makie with which I can zoom into my data. This works already …

---

## [Batching in Flux 0.11.1](https://discourse.julialang.org/t/batching-in-flux-0-11-1/63105)

<div class="topic-metadata">

**Author:** [@sapo](https://discourse.julialang.org/u/sapo)\
**Replies:** 7\
**Last updated:** [June 18, 2021, 1:04pm UTC](https://discourse.julialang.org/t/batching-in-flux-0-11-1/63105 "2021-06-18T13:04:28Z")

</div>

Hello, for a dependency issue, I have to use Flux at version 0.11.1. I cannot understand how to use batches: julia\> using Flux julia\> d = Dense(5, 2) Dense(5, 2) julia\> d(rand(Float32, 5, 64)) |\> size (2, 64) julia\>…

---

## [\[ANN\] Announcing PkgCite.jl](https://discourse.julialang.org/t/ann-announcing-pkgcite-jl/63119)

<div class="topic-metadata">

**Author:** [@SebastianM-C](https://discourse.julialang.org/u/SebastianM-C)\
**Replies:** 1\
**Last updated:** [June 18, 2021, 12:03pm UTC](https://discourse.julialang.org/t/ann-announcing-pkgcite-jl/63119 "2021-06-18T12:03:32Z")

</div>

Hello, I’m glad to announce PkgCite.jl, a package that helps you generate .bib files corresponding to all the packages (and their dependencies) from the current active environment. using PkgCite # Be sure to be in the …

---

## [Ghosting on contour plots of a (x,y)→Bool function](https://discourse.julialang.org/t/ghosting-on-contour-plots-of-a-x-y-bool-function/63110)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 5\
**Last updated:** [June 18, 2021, 12:02pm UTC](https://discourse.julialang.org/t/ghosting-on-contour-plots-of-a-x-y-bool-function/63110 "2021-06-18T12:02:03Z")

</div>

I would like to plot of a (x,y) → Bool function as a contour plot. For the function I am plotting I get a lot of ghosting. The closer to 45° the line is the better it looks. Compare the heatmap to the contour plots: …

---

## [Clear observables created by @lift](https://discourse.julialang.org/t/clear-observables-created-by-lift/63127)

<div class="topic-metadata">

**Author:** [@phlavenk](https://discourse.julialang.org/u/phlavenk)\
**Replies:** 6\
**Last updated:** [June 18, 2021, 11:12am UTC](https://discourse.julialang.org/t/clear-observables-created-by-lift/63127 "2021-06-18T11:12:09Z")

</div>

What is the proper way of clearing the (perhaps wrong) @lift observable listeners? Following example has an error using WGLMakie time = Node(1.5) ξ = @lift( 1.0 \< $time \< 2.0 ? $time - 1.0 : 0.0\*err) #error, err not d…

---

## [Alpha vs color](https://discourse.julialang.org/t/alpha-vs-color/59445)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 5\
**Last updated:** [June 18, 2021, 11:07am UTC](https://discourse.julialang.org/t/alpha-vs-color/59445 "2021-06-18T11:07:19Z")

</div>

In this answer there is band!(x\_plot, mea .- st3, mea .+ st3, color = (:blue, 0.2)) which makes a transparent band but using alpha explicitly doesn’t band!(x\_plot, mea .- st3, mea .+ st3, color = :blue, alpha=0.2)…

---

## [Errors while writing in CuDeviceArray buffers](https://discourse.julialang.org/t/errors-while-writing-in-cudevicearray-buffers/63131)

<div class="topic-metadata">

**Author:** [@koehlerson](https://discourse.julialang.org/u/koehlerson)\
**Replies:** 5\
**Last updated:** [June 18, 2021, 11:07am UTC](https://discourse.julialang.org/t/errors-while-writing-in-cudevicearray-buffers/63131 "2021-06-18T11:07:07Z")

</div>

I have some function which is called by my kernel function foo(F, material, state, buffer,fiber,family) grid = material.convexstrategy.grid grid\_F = material.convexstrategy.grid\_F 𝐠 = material.convexstrategy…

---

## [SGD in Flux.jl](https://discourse.julialang.org/t/sgd-in-flux-jl/63130)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 1\
**Last updated:** [June 18, 2021, 10:30am UTC](https://discourse.julialang.org/t/sgd-in-flux-jl/63130 "2021-06-18T10:30:48Z")

</div>

I’m new to Flux.jl, and I’m kind of confused by the fact that there is no stochastic gradient descent algorithm. I checked the source code, and it seemed to me that Descent is just GD instead of SGD. Of course we can ju…

---

## [\[ANN\] RelocatableFolders.jl](https://discourse.julialang.org/t/ann-relocatablefolders-jl/63132)

<div class="topic-metadata">

**Author:** [@mike](https://discourse.julialang.org/u/mike)\
**Replies:** 0\
**Last updated:** [June 18, 2021, 9:48am UTC](https://discourse.julialang.org/t/ann-relocatablefolders-jl/63132 "2021-06-18T09:48:59Z")

</div>

I’m pleased to announce the first release of RelocatableFolders.jl. Who’s it for? Mostly should be of interest to package authors rather than users of packages. What does it do? It’s a lightweight package that hand…

---

## [Help speedup a brute-force solution](https://discourse.julialang.org/t/help-speedup-a-brute-force-solution/62894)

<div class="topic-metadata">

**Author:** [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Replies:** 13\
**Last updated:** [June 18, 2021, 8:50am UTC](https://discourse.julialang.org/t/help-speedup-a-brute-force-solution/62894 "2021-06-18T08:50:36Z")

</div>

The following function calculates all possible subsets of a set 1:n such that all subsets are primes. This is only a brute-force algorithm to test a solution, so it’s too slow as expected. The number of allocations is hu…

---

## [Memory corruption](https://discourse.julialang.org/t/memory-corruption/63129)

<div class="topic-metadata">

**Author:** [@aml](https://discourse.julialang.org/u/aml)\
**Replies:** 0\
**Last updated:** [June 18, 2021, 8:00am UTC](https://discourse.julialang.org/t/memory-corruption/63129 "2021-06-18T08:00:40Z")

</div>

I have a plugin written in C# that uses an embedded Julia. Most things work OK, but I get a problem caused by memory corruption from time to time. After rereading the chapter on Embedding I noticed that I could be causin…

---

## [Iterator over upper triangular part of Cartesian product?](https://discourse.julialang.org/t/iterator-over-upper-triangular-part-of-cartesian-product/63118)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 3\
**Last updated:** [June 18, 2021, 4:19am UTC](https://discourse.julialang.org/t/iterator-over-upper-triangular-part-of-cartesian-product/63118 "2021-06-18T04:19:12Z")

</div>

Is a (preferably efficient) implementation of the following available in some package? triiter(x) = ((a\[2\], b) for a in enumerate(x) for b in Iterators.drop(x, a\[1\])) julia\> collect(triiter('a':'d')) 6-element Vector{T…

---

## [Bug in unary operator overloading syntax?](https://discourse.julialang.org/t/bug-in-unary-operator-overloading-syntax/63117)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [June 17, 2021, 11:04pm UTC](https://discourse.julialang.org/t/bug-in-unary-operator-overloading-syntax/63117 "2021-06-17T23:04:25Z")

</div>

Why doesn’t the following code work? I’m using Julia 1.6.1 struct MyNumber value::Number end import Base.- -(a::MyNumber)::MyNumber = MyNumber(-a.value) ERROR: syntax: "a::MyNumber" is not a valid function argument…

---

## [Constructing JuMP problems is surprisingly slow](https://discourse.julialang.org/t/constructing-jump-problems-is-surprisingly-slow/63114)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 5\
**Last updated:** [June 17, 2021, 10:29pm UTC](https://discourse.julialang.org/t/constructing-jump-problems-is-surprisingly-slow/63114 "2021-06-17T22:29:30Z")

</div>

I’m in a situation where I’d like to solve a lot of small nonlinear programming problems as quickly as possible. I’ve been surprised to find that JuMP model construction is much slower than I expected. I have a very smal…

---

## [Difference between JuliaDB and DataFrames](https://discourse.julialang.org/t/difference-between-juliadb-and-dataframes/62808)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 13\
**Last updated:** [June 17, 2021, 7:45pm UTC](https://discourse.julialang.org/t/difference-between-juliadb-and-dataframes/62808 "2021-06-17T19:45:37Z")

</div>

Is anyone familar to both DataFrames.jl How does JuliaDB.jl compare to DataFrames.jl?

---

## [How do I fit an MvNormal to a matrix with Distributions.jl?](https://discourse.julialang.org/t/how-do-i-fit-an-mvnormal-to-a-matrix-with-distributions-jl/63072)

<div class="topic-metadata">

**Author:** [@Ivan](https://discourse.julialang.org/u/Ivan)\
**Replies:** 6\
**Last updated:** [June 17, 2021, 6:26pm UTC](https://discourse.julialang.org/t/how-do-i-fit-an-mvnormal-to-a-matrix-with-distributions-jl/63072 "2021-06-17T18:26:36Z")

</div>

I have a matrix of absorbance readings (one column per item) at different wavenumbers (rows). I want to enlarge my dataset with more synthetic data, and I am trying to fit an MvNormal to my matrix -as opposed to fitting …

---

## [Question on % and prime number](https://discourse.julialang.org/t/question-on-and-prime-number/63107)

<div class="topic-metadata">

**Author:** [@daviddoji](https://discourse.julialang.org/u/daviddoji)\
**Replies:** 2\
**Last updated:** [June 17, 2021, 6:23pm UTC](https://discourse.julialang.org/t/question-on-and-prime-number/63107 "2021-06-17T18:23:21Z")

</div>

Hi everyone, Julia newbie here :smiley: In my attempt to solve the following problem using Julia, which is almost a copy of a solution I came up using Python, I’m obviously not entering in the second while-loop (the pri…

---

## [Topic title change to the module thread](https://discourse.julialang.org/t/topic-title-change-to-the-module-thread/63038)

<div class="topic-metadata">

**Author:** [@panos.asproulis](https://discourse.julialang.org/u/panos.asproulis)\
**Replies:** 11\
**Last updated:** [June 17, 2021, 6:23pm UTC](https://discourse.julialang.org/t/topic-title-change-to-the-module-thread/63038 "2021-06-17T18:23:20Z")

</div>

Why was the title of my original post changed? Are the Julia devs so sensitive to the identification of problematic language features, evident by the number of contributors to this thread? Censorship is not the way forw…

---

## [Remove an element from an array without changing the original](https://discourse.julialang.org/t/remove-an-element-from-an-array-without-changing-the-original/63103)

<div class="topic-metadata">

**Author:** [@Sebastian\_Mena](https://discourse.julialang.org/u/Sebastian_Mena)\
**Replies:** 5\
**Last updated:** [June 17, 2021, 5:34pm UTC](https://discourse.julialang.org/t/remove-an-element-from-an-array-without-changing-the-original/63103 "2021-06-17T17:34:13Z")

</div>

I want to delete a element from an array without changing the original. Like this: original\_array = \[12,13,14,15\] new\_array = function\_to\_delete\_a\_element(element\_to\_delete = 14, array = original\_array) print(new\_array)…

---

## [Macro transforming a function call to a new function definition and call the new function](https://discourse.julialang.org/t/macro-transforming-a-function-call-to-a-new-function-definition-and-call-the-new-function/63100)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 3\
**Last updated:** [June 17, 2021, 5:24pm UTC](https://discourse.julialang.org/t/macro-transforming-a-function-call-to-a-new-function-definition-and-call-the-new-function/63100 "2021-06-17T17:24:01Z")

</div>

Continuing the discussion from Make a variable as a global variable within a function: Since the original conversation is too long, I separated this question. Suppose the below codes: function \_my\_func(a, b) c = 2…

---

## [\`eps()\` (epsilon) for Complex floats?](https://discourse.julialang.org/t/eps-epsilon-for-complex-floats/59603)

<div class="topic-metadata">

**Author:** [@JeffFessler](https://discourse.julialang.org/u/JeffFessler)\
**Replies:** 4\
**Last updated:** [June 17, 2021, 5:23pm UTC](https://discourse.julialang.org/t/eps-epsilon-for-complex-floats/59603 "2021-06-17T17:23:40Z")

</div>

It is surprising to me that eps(Complex{Float32}) is unsupported currently, given that there are many applications involving complex data where one would like to specify the precision of some operation appropriately. A …

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

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