# Latest

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

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

**Page:** 1526

---

## [Callback function in a plot library](https://discourse.julialang.org/t/callback-function-in-a-plot-library/52826)

<div class="topic-metadata">

**Author:** [@David\_Ortley](https://discourse.julialang.org/u/David_Ortley)\
**Replies:** 2\
**Last updated:** [January 11, 2021, 5:06pm UTC](https://discourse.julialang.org/t/callback-function-in-a-plot-library/52826 "2021-01-11T17:06:14Z")

</div>

Hey all, I want to create a plot that will will have clickable elements that do some active thing. My interest is in plotting a scatter plot of certain features from a set of waveforms that, when individual elements ar…

---

## [Why I get 'RefValue{SubArray{Int64' and not "simply" 'SubArray{Int64'](https://discourse.julialang.org/t/why-i-get-refvalue-subarray-int64-and-not-simply-subarray-int64/52286)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 13\
**Last updated:** [January 11, 2021, 4:42pm UTC](https://discourse.julialang.org/t/why-i-get-refvalue-subarray-int64-and-not-simply-subarray-int64/52286 "2021-01-11T16:42:01Z")

</div>

I have this in these cases of single columns df = DataFrame(x = \[1, 1, 2, 2\], y = \[1, 2, 101, 102\]); gd = groupby(df, :x); julia\> combine(gd,:x=\>(X-\>Ref(X))=\>:rx) 2×2 DataFrame Row │ x rx │ Int64 Su…

---

## [Calling sympy.stats.sample from SymPy.jl](https://discourse.julialang.org/t/calling-sympy-stats-sample-from-sympy-jl/53092)

<div class="topic-metadata">

**Author:** [@Brian\_Toomey](https://discourse.julialang.org/u/Brian_Toomey)\
**Replies:** 3\
**Last updated:** [January 11, 2021, 4:01pm UTC](https://discourse.julialang.org/t/calling-sympy-stats-sample-from-sympy-jl/53092 "2021-01-11T16:01:11Z")

</div>

Hi Julia discourse – this forum (and Julia) seems so great I thought I would stop lurking. I’ve been looking at how to interact with sympy.stats using SymPy.jl. The author of the package was kind enough to give some ini…

---

## [Trouble with writing a mutable struct with MVector fields](https://discourse.julialang.org/t/trouble-with-writing-a-mutable-struct-with-mvector-fields/53135)

<div class="topic-metadata">

**Author:** [@GrantHecht](https://discourse.julialang.org/u/GrantHecht)\
**Replies:** 8\
**Last updated:** [January 11, 2021, 2:39pm UTC](https://discourse.julialang.org/t/trouble-with-writing-a-mutable-struct-with-mvector-fields/53135 "2021-01-11T14:39:23Z")

</div>

I’m working on implementing a Particle Swarm Optimization routine in Julia and would like to define a “Particle” mutable struct with MVector fields (from StaticArrays.jl) but am running into some issues. Here is my curr…

---

## [Contents of \`.julia/registries\` deleted upon Pkg operations or Pluto notebook use](https://discourse.julialang.org/t/contents-of-julia-registries-deleted-upon-pkg-operations-or-pluto-notebook-use/53111)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 9\
**Last updated:** [January 11, 2021, 11:45am UTC](https://discourse.julialang.org/t/contents-of-julia-registries-deleted-upon-pkg-operations-or-pluto-notebook-use/53111 "2021-01-11T11:45:03Z")

</div>

So after a few to many edits and updates, here is a cleaner and updated second rewrite of the post. The problem is that during what I have identified as “trigger events”, the contents of my .julia/registries folder is d…

---

## [Descending countingSort in Julia](https://discourse.julialang.org/t/descending-countingsort-in-julia/53151)

<div class="topic-metadata">

**Author:** [@Djape](https://discourse.julialang.org/u/Djape)\
**Replies:** 1\
**Last updated:** [January 11, 2021, 10:50am UTC](https://discourse.julialang.org/t/descending-countingsort-in-julia/53151 "2021-01-11T10:50:57Z")

</div>

Hi everyone, I recently started programming in Julia programming language. I got a task from my profesor to create a countingSort algorythm and I did it. My question is what adjustments should I make so array would be in…

---

## [Cannot find name corresponding to UUID](https://discourse.julialang.org/t/cannot-find-name-corresponding-to-uuid/53153)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 5\
**Last updated:** [January 11, 2021, 10:46am UTC](https://discourse.julialang.org/t/cannot-find-name-corresponding-to-uuid/53153 "2021-01-11T10:46:30Z")

</div>

When updating my packages I encountered the error: ERROR: cannot find name corresponding to UUID 4af54fe1-eca0-43a8-85a7-787d91b784e3 in a registry Searching online I found that uuid belongs to LazyArtifacts.jl (https:…

---

## [Using ToeplitzMatrices](https://discourse.julialang.org/t/using-toeplitzmatrices/53140)

<div class="topic-metadata">

**Author:** [@panditabupesh](https://discourse.julialang.org/u/panditabupesh)\
**Replies:** 1\
**Last updated:** [January 11, 2021, 10:32am UTC](https://discourse.julialang.org/t/using-toeplitzmatrices/53140 "2021-01-11T10:32:27Z")

</div>

using ToeplitzMatrices Hankel(\[1.,2.,3.\], 3:5) Hankel(\[1,2,3\], 3:5) The first example work, but the second fails with this message: ERROR: LoadError: TypeError: in new, expected Toeplitz{Int64,S} where S\<:Number, got …

---

## [Can't compile a GPU kernel function for =\>](https://discourse.julialang.org/t/cant-compile-a-gpu-kernel-function-for/53100)

<div class="topic-metadata">

**Author:** [@Stephan\_Meyn](https://discourse.julialang.org/u/Stephan_Meyn)\
**Replies:** 2\
**Last updated:** [January 11, 2021, 10:36am UTC](https://discourse.julialang.org/t/cant-compile-a-gpu-kernel-function-for/53100 "2021-01-11T10:36:55Z")

</div>

I’m trying to persuade CUDA.jl to compile a kernel function. After reducing the issue I have come to this sample code using CUDA x=Float32(2.0) knots =CuArray{Float32,1}(\[1.2, 2.0, 3.0\]) mapOp(v::Float32)::Int = v \>= x…

---

## [Juno profiler results not showing up](https://discourse.julialang.org/t/juno-profiler-results-not-showing-up/53048)

<div class="topic-metadata">

**Author:** [@Johncowk](https://discourse.julialang.org/u/Johncowk)\
**Replies:** 3\
**Last updated:** [January 11, 2021, 10:16am UTC](https://discourse.julialang.org/t/juno-profiler-results-not-showing-up/53048 "2021-01-11T10:16:14Z")

</div>

I am trying to profile a function. For this I want to use the @profiler macro which seems to be the best option for me and also I am unable to install the other profilers available anyways (either GTK cannot be installed…

---

## [Error using PackageCompiler for Blink](https://discourse.julialang.org/t/error-using-packagecompiler-for-blink/40530)

<div class="topic-metadata">

**Author:** [@Charlie\_Ping](https://discourse.julialang.org/u/Charlie_Ping)\
**Replies:** 4\
**Last updated:** [January 11, 2021, 9:31am UTC](https://discourse.julialang.org/t/error-using-packagecompiler-for-blink/40530 "2021-01-11T09:31:14Z")

</div>

I’m on windows 10. Here is the error: ┌ Warning: Error requiring Mux from WebIO: │ LoadError: ArgumentError: Package WebIO does not have JSON in its dependencies: │ - If you have WebIO checked out for development and h…

---

## [What shape should data be in to perform a linear fit with GLM?](https://discourse.julialang.org/t/what-shape-should-data-be-in-to-perform-a-linear-fit-with-glm/53120)

<div class="topic-metadata">

**Author:** [@alice](https://discourse.julialang.org/u/alice)\
**Replies:** 7\
**Last updated:** [January 11, 2021, 9:22am UTC](https://discourse.julialang.org/t/what-shape-should-data-be-in-to-perform-a-linear-fit-with-glm/53120 "2021-01-11T09:22:15Z")

</div>

I am trying to fit some data with a variable number of dimensions using a linear fit. I am currently trying to use GLM, but I am happy to use any other library. I’ve been running in to a lot of trouble getting the data …

---

## [Using Julia to solve semidefinite programming problem that has vector solutions](https://discourse.julialang.org/t/using-julia-to-solve-semidefinite-programming-problem-that-has-vector-solutions/53134)

<div class="topic-metadata">

**Author:** [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)\
**Replies:** 6\
**Last updated:** [January 11, 2021, 6:50am UTC](https://discourse.julialang.org/t/using-julia-to-solve-semidefinite-programming-problem-that-has-vector-solutions/53134 "2021-01-11T06:50:02Z")

</div>

Hi everyone! I need to use Julia to solve a SDP. What would you suggest to use to solve the SDP? I tried Convex and JuMP with ProxSDP, I couldn’t get it to work.

---

## [Errors during test CUDA](https://discourse.julialang.org/t/errors-during-test-cuda/53142)

<div class="topic-metadata">

**Author:** [@youeh1](https://discourse.julialang.org/u/youeh1)\
**Replies:** 0\
**Last updated:** [January 11, 2021, 6:09am UTC](https://discourse.julialang.org/t/errors-during-test-cuda/53142 "2021-01-11T06:09:42Z")

</div>

Hi, I just format my labtop and install graphics drivers CUDA 11.2 julia (1.53) I added CUDA.jl and downloaded cuDNN111 via artifact and had no errors by here. I ran Pkg\> test CUDA, now I got errors ┌ Error: Excep…

---

## [Stack-allocated arrays without excessive compilation time](https://discourse.julialang.org/t/stack-allocated-arrays-without-excessive-compilation-time/52870)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 11\
**Last updated:** [January 11, 2021, 3:59am UTC](https://discourse.julialang.org/t/stack-allocated-arrays-without-excessive-compilation-time/52870 "2021-01-11T03:59:09Z")

</div>

I find SArray very useful because they are stack-allocated — this is important generally, but specifically for threaded code I find that minimizing allocations is a must. However, I also fine that excessive use of SArra…

---

## [How to find and add the right version of packages for Flux.jl](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843)

<div class="topic-metadata">

**Author:** [@Michaela\_Maskova](https://discourse.julialang.org/u/Michaela_Maskova)\
**Replies:** 11\
**Last updated:** [January 11, 2021, 3:51am UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843 "2021-01-11T03:51:19Z")

</div>

Hi there, I’m trying to compile new Flux package in master version - as the Flux#master(0.9.0) is supposed to be quite better than the previous versions. I’ve been instructed to use Julia 1.3 but I don’t know how to mak…

---

## [Suppress license output from solver in JuMP.Model](https://discourse.julialang.org/t/suppress-license-output-from-solver-in-jump-model/20828)

<div class="topic-metadata">

**Author:** [@torgo](https://discourse.julialang.org/u/torgo)\
**Replies:** 13\
**Last updated:** [January 11, 2021, 1:24am UTC](https://discourse.julialang.org/t/suppress-license-output-from-solver-in-jump-model/20828 "2021-01-11T01:24:41Z")

</div>

using JuMP, Gurobi m = Model(solver=GurobiSolver(OutputFlag=0)) I have a program where the second line gets called frequently. Every time it does, this gets printed to stdout: Academic license - for non-commercial use…

---

## [Promote big duals in ForwardDiff](https://discourse.julialang.org/t/promote-big-duals-in-forwarddiff/53126)

<div class="topic-metadata">

**Author:** [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Replies:** 0\
**Last updated:** [January 10, 2021, 10:30pm UTC](https://discourse.julialang.org/t/promote-big-duals-in-forwarddiff/53126 "2021-01-10T22:30:31Z")

</div>

I’m computing some derivatives of functions where the interior temporarily enters the realm of BigFloat, using ForwardDiff g(x) = float(log(exp(x\*1e6))) ForwardDiff.derivative(g, 1.0) NaN In this example, the exponent…

---

## [How to use a Latex package in Plots with GR backend?](https://discourse.julialang.org/t/how-to-use-a-latex-package-in-plots-with-gr-backend/53099)

<div class="topic-metadata">

**Author:** [@brianyjtai1994](https://discourse.julialang.org/u/brianyjtai1994)\
**Replies:** 0\
**Last updated:** [January 9, 2021, 11:25pm UTC](https://discourse.julialang.org/t/how-to-use-a-latex-package-in-plots-with-gr-backend/53099 "2021-01-09T23:25:22Z")

</div>

In PyPlot.jl, for example using PyPlot, LaTeXStrings rcParams = PyPlot.PyDict(PyPlot.matplotlib."rcParams") rcParams\["text.latex.preamble"\] = "\\\\usepackage{siunitx}" help me to directly use a Latex command from siunit…

---

## [Struct with Multiple Dispatch](https://discourse.julialang.org/t/struct-with-multiple-dispatch/53118)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 11\
**Last updated:** [January 10, 2021, 9:19pm UTC](https://discourse.julialang.org/t/struct-with-multiple-dispatch/53118 "2021-01-10T21:19:57Z")

</div>

Hello, I’m new to Julia and am watching the Juliacon 2020 video series. I have a question about the use of a mutable struct in this video here. From what I am seeing, I think he defines a mutable struct with some field…

---

## [Misunderstood scope rules?](https://discourse.julialang.org/t/misunderstood-scope-rules/53097)

<div class="topic-metadata">

**Author:** [@austinbean](https://discourse.julialang.org/u/austinbean)\
**Replies:** 3\
**Last updated:** [January 10, 2021, 8:14pm UTC](https://discourse.julialang.org/t/misunderstood-scope-rules/53097 "2021-01-10T20:14:02Z")

</div>

I think I’m misunderstanding something about variable scopes within functions and I would like some feedback. Here is a MWE: # this function modifies its argument # and the argument 'stays modified' outside of f1 func…

---

## [ForwardDiff.jl \\ Optim.jl and recompilation for any vector size](https://discourse.julialang.org/t/forwarddiff-jl-optim-jl-and-recompilation-for-any-vector-size/53104)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 4\
**Last updated:** [January 10, 2021, 5:54pm UTC](https://discourse.julialang.org/t/forwarddiff-jl-optim-jl-and-recompilation-for-any-vector-size/53104 "2021-01-10T17:54:21Z")

</div>

I try to optimize function with different variable vector size. And I think that for each task type method is compilated again. Main function is type-stable as I think by @code\_warntype and @code\_typed. And probably eac…

---

## [Computing an integral for expectation over a normal distribution](https://discourse.julialang.org/t/computing-an-integral-for-expectation-over-a-normal-distribution/53121)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 8\
**Last updated:** [January 10, 2021, 6:20pm UTC](https://discourse.julialang.org/t/computing-an-integral-for-expectation-over-a-normal-distribution/53121 "2021-01-10T18:20:50Z")

</div>

Solved: The main problem was that Normal accepts Normal(μ,σ). I thought it was Normal(μ,σ^2). The other discrepancies are still a little mysterious but this explains why my Gauss Hermite was so off. I want to compute th…

---

## [Julia Flux error- Unsupported dynamic function invocation (call to pointerref)](https://discourse.julialang.org/t/julia-flux-error-unsupported-dynamic-function-invocation-call-to-pointerref/53106)

<div class="topic-metadata">

**Author:** [@Rijo\_Thomas](https://discourse.julialang.org/u/Rijo_Thomas)\
**Replies:** 0\
**Last updated:** [January 10, 2021, 7:15am UTC](https://discourse.julialang.org/t/julia-flux-error-unsupported-dynamic-function-invocation-call-to-pointerref/53106 "2021-01-10T07:15:05Z")

</div>

%%julia # Load the data println("start") x\_train, y\_train,x\_valid, y\_valid=h5open("./data.h5", "r") do file read(file, "tr\_X","tr\_Y","va\_X","va\_Y") end|\> gpu println("read done") x\_train = reshape(x\_train, (80,…

---

## [Confused with type definition](https://discourse.julialang.org/t/confused-with-type-definition/53115)

<div class="topic-metadata">

**Author:** [@alemelis](https://discourse.julialang.org/u/alemelis)\
**Replies:** 13\
**Last updated:** [January 10, 2021, 4:56pm UTC](https://discourse.julialang.org/t/confused-with-type-definition/53115 "2021-01-10T16:56:41Z")

</div>

Hello there, say I want to create a new type which is basically the same of Array{Float64, 1} except for the behaviour for one operator (for example +). What I’m doing now is the following. First create a new mutable ty…

---

## [MLJ - Error - Models support multitarget but measures do not?](https://discourse.julialang.org/t/mlj-error-models-support-multitarget-but-measures-do-not/53091)

<div class="topic-metadata">

**Author:** [@diadora77](https://discourse.julialang.org/u/diadora77)\
**Replies:** 2\
**Last updated:** [January 10, 2021, 1:50pm UTC](https://discourse.julialang.org/t/mlj-error-models-support-multitarget-but-measures-do-not/53091 "2021-01-10T13:50:22Z")

</div>

Hi- I’m relatively new to MLJ but have decent knowledge and experience using ScikitLearn. MLJ looks promising with more flexibility in model creation. In testing it out for my research, I’m struggling to get a basic mod…

---

## [Introductory level video tutorials on matrices, linear systems & matrix algebra](https://discourse.julialang.org/t/introductory-level-video-tutorials-on-matrices-linear-systems-matrix-algebra/53114)

<div class="topic-metadata">

**Author:** [@forestacorn](https://discourse.julialang.org/u/forestacorn)\
**Replies:** 0\
**Last updated:** [January 10, 2021, 12:42pm UTC](https://discourse.julialang.org/t/introductory-level-video-tutorials-on-matrices-linear-systems-matrix-algebra/53114 "2021-01-10T12:42:10Z")

</div>

Some more introductory level back to basics video tutorials from Juan Klopper using Julia and Pluto notebooks: Tutorial on matrices with help from Julia Solving linear systems using elementary row operations with Julia …

---

## [Setting up Julia Kernel in Jupyter in VS Code](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 6\
**Last updated:** [January 10, 2021, 11:05am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598 "2021-01-10T11:05:22Z")

</div>

How do I set up a Julia kernal for Jupyter in VS Code? I’m should have the latest version of Julia set up in Ubuntu 20.10. I also have inkscape set up, and will need to get things to work, so that I can export PDF.

---

## [Print the current stacktrace to stdout without throwing an exception](https://discourse.julialang.org/t/print-the-current-stacktrace-to-stdout-without-throwing-an-exception/53107)

<div class="topic-metadata">

**Author:** [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Replies:** 4\
**Last updated:** [January 10, 2021, 8:49am UTC](https://discourse.julialang.org/t/print-the-current-stacktrace-to-stdout-without-throwing-an-exception/53107 "2021-01-10T08:49:51Z")

</div>

If I throw an exception, it prints the full stacktrace at the current point. Is there a way to print the current stacktrace to stdout without throwing an exception?

---

## [Drawing text over pixels of an image](https://discourse.julialang.org/t/drawing-text-over-pixels-of-an-image/53040)

<div class="topic-metadata">

**Author:** [@claforte](https://discourse.julialang.org/u/claforte)\
**Replies:** 2\
**Last updated:** [January 10, 2021, 5:37am UTC](https://discourse.julialang.org/t/drawing-text-over-pixels-of-an-image/53040 "2021-01-10T05:37:23Z")

</div>

Hello Julia plotting experts, I want to annotate images by drawing text over the pixels of an image. This is to generate a lossless video where each frame shows an animated grid of tiles, each output by a different super…

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

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