# Latest

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

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

**Page:** 1166

---

## [Is this @sprintf (annoying) behaviour intended?](https://discourse.julialang.org/t/is-this-sprintf-annoying-behaviour-intended/68483)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 8\
**Last updated:** [December 30, 2021, 10:02pm UTC](https://discourse.julialang.org/t/is-this-sprintf-annoying-behaviour-intended/68483 "2021-12-30T22:02:12Z")

</div>

The crux is that I want to build a string programmatically with a variable number of elements and can’t find a way to do it with @sprintf julia\> bnds = \[1,2,3\]; julia\> @sprintf("%d,%d,%d,",bnds...) "1,2,3," julia\> repe…

---

## [Inversion and multiplication of sparse matrices](https://discourse.julialang.org/t/inversion-and-multiplication-of-sparse-matrices/73819)

<div class="topic-metadata">

**Author:** [@Rajesh\_Nakka](https://discourse.julialang.org/u/Rajesh_Nakka)\
**Replies:** 7\
**Last updated:** [December 30, 2021, 9:52pm UTC](https://discourse.julialang.org/t/inversion-and-multiplication-of-sparse-matrices/73819 "2021-12-30T21:52:21Z")

</div>

I have encountered a problem of the following kind. C = A^-1 \* B where A is a very large nxn sparse banded symmetric matrix (of SparseMatrixCSC type) and B is nx5 matrix. I have read on this forum and somewhere else…

---

## [Prime numbers between given two numbers in Julia and Python](https://discourse.julialang.org/t/prime-numbers-between-given-two-numbers-in-julia-and-python/73626)

<div class="topic-metadata">

**Author:** [@apoorvvyas52](https://discourse.julialang.org/u/apoorvvyas52)\
**Replies:** 11\
**Last updated:** [December 30, 2021, 9:26pm UTC](https://discourse.julialang.org/t/prime-numbers-between-given-two-numbers-in-julia-and-python/73626 "2021-12-30T21:26:55Z")

</div>

See the Python code for finding prime numbers between given two numbers lower and upper ‘’'lower = 3 upper = 15 print(“Prime numbers between”, lower, “and”, upper, “are:”) for num in range(lower, upper + 1): for …

---

## [Efficient iterated discrete dynamics in Flux](https://discourse.julialang.org/t/efficient-iterated-discrete-dynamics-in-flux/73837)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 0\
**Last updated:** [December 30, 2021, 9:16pm UTC](https://discourse.julialang.org/t/efficient-iterated-discrete-dynamics-in-flux/73837 "2021-12-30T21:16:04Z")

</div>

I’m trying to implement a Koopman operator layer in Flux. This is the operation of starting with a vector, x, and iteratively multiplying it by a dynamics matrix, K, for n steps, e.g. x1 = x x2 = K \* x1 x3 = K \* x2 e…

---

## [How to add emojis in jupyter notebook as done here?](https://discourse.julialang.org/t/how-to-add-emojis-in-jupyter-notebook-as-done-here/72756)

<div class="topic-metadata">

**Author:** [@apoorvvyas52](https://discourse.julialang.org/u/apoorvvyas52)\
**Replies:** 8\
**Last updated:** [December 30, 2021, 8:25pm UTC](https://discourse.julialang.org/t/how-to-add-emojis-in-jupyter-notebook-as-done-here/72756 "2021-12-30T20:25:53Z")

</div>

How to add emojis in jupyter notebook as done here?Variables and Printing | JuliaAcademy at 6 :00 time stamp . emoji of cat is inserted but not taught how it was done. I am new to programming and jupyter. Can someone p…

---

## [Using a linear combination of dataframe columns as a functional input](https://discourse.julialang.org/t/using-a-linear-combination-of-dataframe-columns-as-a-functional-input/73834)

<div class="topic-metadata">

**Author:** [@jdhooghe](https://discourse.julialang.org/u/jdhooghe)\
**Replies:** 0\
**Last updated:** [December 30, 2021, 8:13pm UTC](https://discourse.julialang.org/t/using-a-linear-combination-of-dataframe-columns-as-a-functional-input/73834 "2021-12-30T20:13:16Z")

</div>

Hello, I have a dataframe whose column names represent polynomial portions such as ‘xy’ and as such, are symbols. I want to take all of these column names, which include: :x :y :xy :xx :yy and add them together us…

---

## [Why .Threads?](https://discourse.julialang.org/t/why-threads/73832)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [December 30, 2021, 7:58pm UTC](https://discourse.julialang.org/t/why-threads/73832 "2021-12-30T19:58:59Z")

</div>

julia\> using .Threads julia\> Threads Base.Threads Modules docs says A relative module qualifier starts with a period (.), which corresponds to the current module, and each successive . leads to the parent of the curr…

---

## [Best way of working to wrap a c-library?](https://discourse.julialang.org/t/best-way-of-working-to-wrap-a-c-library/73823)

<div class="topic-metadata">

**Author:** [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Replies:** 1\
**Last updated:** [December 30, 2021, 6:21pm UTC](https://discourse.julialang.org/t/best-way-of-working-to-wrap-a-c-library/73823 "2021-12-30T18:21:16Z")

</div>

Dear all, I have somewhat experience, but the tooling has hugely improved, namely BinaryBuilder.jl. I’m wrapping this RTKLIB http://www.rtklib.com/. I’m using BinaryBuilder.jl and Clang.jl. I got started quite ok, but n…

---

## [Revise 3.3 has problems tracking changed files?](https://discourse.julialang.org/t/revise-3-3-has-problems-tracking-changed-files/73820)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 4\
**Last updated:** [December 30, 2021, 5:00pm UTC](https://discourse.julialang.org/t/revise-3-3-has-problems-tracking-changed-files/73820 "2021-12-30T17:00:46Z")

</div>

I use Revise v3.3.0, recently updated from 3.2.1. It seems to me that it is now broken in that it does not track changed files anymore. Has anyone else seen it? Edit: Revise v3.2.1 works still correctly on the same se…

---

## [ANN: Package for NIST Statistical Reference Data](https://discourse.julialang.org/t/ann-package-for-nist-statistical-reference-data/73822)

<div class="topic-metadata">

**Author:** [@joshday](https://discourse.julialang.org/u/joshday)\
**Replies:** 0\
**Last updated:** [December 30, 2021, 4:59pm UTC](https://discourse.julialang.org/t/ann-package-for-nist-statistical-reference-data/73822 "2021-12-30T16:59:46Z")

</div>

Hey all, I’m working on a package to aid in working with the NIST Statistical Reference Data (StRD), a collection of datasets and certified computations meant to help validate statistical software. I did not find any u…

---

## [Numerically evaluate a symbolic expression](https://discourse.julialang.org/t/numerically-evaluate-a-symbolic-expression/73816)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 2\
**Last updated:** [December 30, 2021, 12:45pm UTC](https://discourse.julialang.org/t/numerically-evaluate-a-symbolic-expression/73816 "2021-12-30T12:45:48Z")

</div>

First steps using Symbolics.jl. I’d like to program an elementary calculus trainer: An expression is shown As solution, the expanded expression is shown As proof, the expression is evaluated with numerical values. Wh…

---

## [How to add captions in Makie?](https://discourse.julialang.org/t/how-to-add-captions-in-makie/73800)

<div class="topic-metadata">

**Author:** [@aachener](https://discourse.julialang.org/u/aachener)\
**Replies:** 11\
**Last updated:** [December 30, 2021, 4:02pm UTC](https://discourse.julialang.org/t/how-to-add-captions-in-makie/73800 "2021-12-30T16:02:39Z")

</div>

Hello guys, I am just wondering how to add captions to figures in Makie, as highlighted in the following picture in red? I tried annotations() and text() but the effect are not satisfactory. Maybe I used them in a wrong…

---

## [Defining functions with multiple methods inside a function](https://discourse.julialang.org/t/defining-functions-with-multiple-methods-inside-a-function/73768)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 4\
**Last updated:** [December 30, 2021, 3:55pm UTC](https://discourse.julialang.org/t/defining-functions-with-multiple-methods-inside-a-function/73768 "2021-12-30T15:55:24Z")

</div>

I am writing a data type that is, essentially, a wrapper for a function, which will be accessed as a functor, but the arguments for the outside struct constructor determine the nature of the function. (As an irrelevant …

---

## [Custom printing of struct?](https://discourse.julialang.org/t/custom-printing-of-struct/73812)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 4\
**Last updated:** [December 30, 2021, 3:30pm UTC](https://discourse.julialang.org/t/custom-printing-of-struct/73812 "2021-12-30T15:30:28Z")

</div>

If I have a struct with some arbitrary values, how can I make a function, such that when I call “print” or “println” it will print the struct in the way I define? Kind regards

---

## [Trigonometric functions do not use SIMD - Solved: use LoopVectorization.jl](https://discourse.julialang.org/t/trigonometric-functions-do-not-use-simd-solved-use-loopvectorization-jl/48722)

<div class="topic-metadata">

**Author:** [@cuihantao](https://discourse.julialang.org/u/cuihantao)\
**Replies:** 9\
**Last updated:** [December 30, 2021, 3:29pm UTC](https://discourse.julialang.org/t/trigonometric-functions-do-not-use-simd-solved-use-loopvectorization-jl/48722 "2021-12-30T15:29:22Z")

</div>

I noticed that computations with trigonometric functions cannot use SIMD. Is this a nature of trigonometric functions? I would like to learn more details. My test code is as follows: function two\_mul(out, a1, a2) @…

---

## [LogNormal-Distribution - how to set mu and sigma](https://discourse.julialang.org/t/lognormal-distribution-how-to-set-mu-and-sigma/7101)

<div class="topic-metadata">

**Author:** [@LotteVictor](https://discourse.julialang.org/u/LotteVictor)\
**Replies:** 17\
**Last updated:** [December 30, 2021, 3:20pm UTC](https://discourse.julialang.org/t/lognormal-distribution-how-to-set-mu-and-sigma/7101 "2021-12-30T15:20:08Z")

</div>

Hey there! I’m trying to draw random numbers from a Log-Normal distribution with a given mean and standard-deviation. As far as i know, the LogNormal(\\mu \\sigma) lets you set the mean and standard deviation of the distri…

---

## [Can we use sine and cosine on a matrix of any dimension that needed not to be a square matrix?](https://discourse.julialang.org/t/can-we-use-sine-and-cosine-on-a-matrix-of-any-dimension-that-needed-not-to-be-a-square-matrix/73813)

<div class="topic-metadata">

**Author:** [@Shivam\_Jha](https://discourse.julialang.org/u/Shivam_Jha)\
**Replies:** 1\
**Last updated:** [December 30, 2021, 11:44am UTC](https://discourse.julialang.org/t/can-we-use-sine-and-cosine-on-a-matrix-of-any-dimension-that-needed-not-to-be-a-square-matrix/73813 "2021-12-30T11:44:21Z")

</div>

" A=rand(2,3) cos(A) #will create error " what is the alternative to this

---

## [Docs DifferentialEquations.jl SecondOrderODEProblem](https://discourse.julialang.org/t/docs-differentialequations-jl-secondorderodeproblem/73773)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 1\
**Last updated:** [December 30, 2021, 11:14am UTC](https://discourse.julialang.org/t/docs-differentialequations-jl-secondorderodeproblem/73773 "2021-12-30T11:14:10Z")

</div>

What does the symbol f (as opposed to f1 or f2) in SecondOrderODEProblem{isinplace}(f,du0,u0,tspan,p=NullParameters();kwargs…) on the page Dynamical, Hamiltonian, and 2nd Order ODE Solvers · DifferentialEquations.jl re…

---

## [How to get values of dictionary by using array of keys?](https://discourse.julialang.org/t/how-to-get-values-of-dictionary-by-using-array-of-keys/73650)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 16\
**Last updated:** [December 30, 2021, 10:42am UTC](https://discourse.julialang.org/t/how-to-get-values-of-dictionary-by-using-array-of-keys/73650 "2021-12-30T10:42:22Z")

</div>

I want access to dictionary with vector, or array. If it possible natively, i want like below code: julia\> foo = Dict("Ac" =\> 4, "B" =\> 1, "d" =\> 2) Dict{String, Int64} with 3 entries: "B" =\> 1 "Ac" =\> 4 "d" =\> …

---

## [Center equation consisting of LaTeX and Julia in Pluto markdown](https://discourse.julialang.org/t/center-equation-consisting-of-latex-and-julia-in-pluto-markdown/73758)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 3\
**Last updated:** [December 30, 2021, 9:53am UTC](https://discourse.julialang.org/t/center-equation-consisting-of-latex-and-julia-in-pluto-markdown/73758 "2021-12-30T09:53:04Z")

</div>

Hi all, I am trying to center align an equation in Pluto. Here is a MWE: md" $\\theta =$ $(string(round.(rand(3), digits = 3))) " The equation is left justified. I tried bringing in html to center it, but to no avail…

---

## [Knet prediction with CNN](https://discourse.julialang.org/t/knet-prediction-with-cnn/73527)

<div class="topic-metadata">

**Author:** [@KKesgin](https://discourse.julialang.org/u/KKesgin)\
**Replies:** 1\
**Last updated:** [December 30, 2021, 9:43am UTC](https://discourse.julialang.org/t/knet-prediction-with-cnn/73527 "2021-12-30T09:43:16Z")

</div>

Hi, I’m new to neural nets with Julia and I’m guessing what I’ll ask is a very trivial question but I never struggled this much when I was getting started with the TensorFlow and I’m resisting really hard to not go back…

---

## [Do julia structs have member functions (and this-\>)](https://discourse.julialang.org/t/do-julia-structs-have-member-functions-and-this/8839)

<div class="topic-metadata">

**Author:** [@ivo\_welch](https://discourse.julialang.org/u/ivo_welch)\
**Replies:** 28\
**Last updated:** [November 19, 2021, 7:56am UTC](https://discourse.julialang.org/t/do-julia-structs-have-member-functions-and-this/8839 "2021-11-19T07:56:46Z")

</div>

I see that structs can have constructors, but can they also contain functions? I tried julia\> mutable struct b; x::Int64; function y() x=22; end; end which gave no error, but b.y() does not work.

---

## [Gadfly plots came out really small in Pluto.jl](https://discourse.julialang.org/t/gadfly-plots-came-out-really-small-in-pluto-jl/73671)

<div class="topic-metadata">

**Author:** [@maxwindiff](https://discourse.julialang.org/u/maxwindiff)\
**Replies:** 2\
**Last updated:** [December 30, 2021, 3:46am UTC](https://discourse.julialang.org/t/gadfly-plots-came-out-really-small-in-pluto-jl/73671 "2021-12-30T03:46:02Z")

</div>

I’m trying out Gadfly in Pluto for the first time, and for some reason the plots came out really tiny. I tried fiddling with set\_default\_plot\_size(), but it only changes the size of the content, not the “viewport” in the…

---

## [Problem in plot when use RCall package](https://discourse.julialang.org/t/problem-in-plot-when-use-rcall-package/73798)

<div class="topic-metadata">

**Author:** [@maoc](https://discourse.julialang.org/u/maoc)\
**Replies:** 2\
**Last updated:** [December 30, 2021, 3:27am UTC](https://discourse.julialang.org/t/problem-in-plot-when-use-rcall-package/73798 "2021-12-30T03:27:16Z")

</div>

This question is not necessarily a question related to the julia language, but rather to the RCall package. I don’t know if the problem is with RCall or jupyter notebook either. I need to use Julia and R on the same note…

---

## [Plots / GR cutting off y axis labels / needs more padding](https://discourse.julialang.org/t/plots-gr-cutting-off-y-axis-labels-needs-more-padding/73778)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 3\
**Last updated:** [December 30, 2021, 2:26am UTC](https://discourse.julialang.org/t/plots-gr-cutting-off-y-axis-labels-needs-more-padding/73778 "2021-12-30T02:26:53Z")

</div>

I’m plotting some data with StatsPlots and using savefig and winding up with something like this: On the lower plot the y axis label is “Mbps” but it doesn’t show up because it’s “off the screen” can anyone tell me h…

---

## [GPU compute & high precision general questions](https://discourse.julialang.org/t/gpu-compute-high-precision-general-questions/61527)

<div class="topic-metadata">

**Author:** [@HexSpin](https://discourse.julialang.org/u/HexSpin)\
**Replies:** 19\
**Last updated:** [December 30, 2021, 2:11am UTC](https://discourse.julialang.org/t/gpu-compute-high-precision-general-questions/61527 "2021-12-30T02:11:47Z")

</div>

Yesterday, for my birthday, my wife took me to MicroCenter and gave me her blessing to build a replacement for my 2010 Mac Pro. Soon I had a cart loaded with a 16 core Ryzen 9, case, memory …and in a fit of irrational …

---

## [\[ANN\] Cosmology on the sphere with PowerSpectra.jl, WignerFamilies.jl, and Healpix.jl 3.0](https://discourse.julialang.org/t/ann-cosmology-on-the-sphere-with-powerspectra-jl-wignerfamilies-jl-and-healpix-jl-3-0/73799)

<div class="topic-metadata">

**Author:** [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Replies:** 0\
**Last updated:** [December 30, 2021, 1:24am UTC](https://discourse.julialang.org/t/ann-cosmology-on-the-sphere-with-powerspectra-jl-wignerfamilies-jl-and-healpix-jl-3-0/73799 "2021-12-30T01:24:14Z")

</div>

Here are some related packages for the analysis of sky maps. In cosmology, this is sometimes called “curved sky” data analysis, since observations are made on the celestial sphere. These packages have been around for a w…

---

## [OpenCL status in Julia](https://discourse.julialang.org/t/opencl-status-in-julia/34442)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 18\
**Last updated:** [December 29, 2021, 11:50pm UTC](https://discourse.julialang.org/t/opencl-status-in-julia/34442 "2021-12-29T23:50:06Z")

</div>

Hi! I verified that I can greatly improve my satellite simulator if I use the GPU processing of some parts. It will be a huge change. Since I do not want to lock this feature for NVIDIA users only (I am Mac user, so no …

---

## [In python an object exposes an event but I can't get at it in PyCall](https://discourse.julialang.org/t/in-python-an-object-exposes-an-event-but-i-cant-get-at-it-in-pycall/73788)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 2\
**Last updated:** [December 29, 2021, 10:44pm UTC](https://discourse.julialang.org/t/in-python-an-object-exposes-an-event-but-i-cant-get-at-it-in-pycall/73788 "2021-12-29T22:44:17Z")

</div>

Hi there I am working my way through a python script and not sure how to progress. The python code looks like this def onBarUpdate(bars, hasNewBar): print( datetime.timestamp(bars\[-1\].time),"^ ", bars.contract.…

---

## [Two y-axes in AoG/Makie?](https://discourse.julialang.org/t/two-y-axes-in-aog-makie/73780)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 3\
**Last updated:** [December 29, 2021, 10:46pm UTC](https://discourse.julialang.org/t/two-y-axes-in-aog-makie/73780 "2021-12-29T22:46:23Z")

</div>

How can create a plot with two y-axes using AoG / Makie? I want to have two “marks” / geometries with different y-axes. Here is an example using VegaLite.jl. plt = @vlplot( data = data0, mark …

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

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