# Latest

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

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

**Page:** 869

---

## [KernelAbstractions is slower than CUDA](https://discourse.julialang.org/t/kernelabstractions-is-slower-than-cuda/76473)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 8\
**Last updated:** [November 10, 2022, 8:01pm UTC](https://discourse.julialang.org/t/kernelabstractions-is-slower-than-cuda/76473 "2022-11-10T20:01:42Z")

</div>

Hello, For a simple multiplication as in the example below I see that the kernel written with KernelAbstractions is almost twice slower than the one written with pure CUDA. Am I doing something wrong, or KA indeed intro…

---

## [Cartesian Product Iterator from a Matrix](https://discourse.julialang.org/t/cartesian-product-iterator-from-a-matrix/90066)

<div class="topic-metadata">

**Author:** [@Mark\_Williams](https://discourse.julialang.org/u/Mark_Williams)\
**Replies:** 2\
**Last updated:** [November 10, 2022, 7:43pm UTC](https://discourse.julialang.org/t/cartesian-product-iterator-from-a-matrix/90066 "2022-11-10T19:43:50Z")

</div>

I would like to take a matrix, A, and iterate over the Cartesian product of its entries. I can easily do this by for (a,b,c) in Iterators.product(A\[:,1\], A\[:,2\], A\[:,3\]) println("$a, $b, $c") end But what I would…

---

## [Zygote differentiation with DynamicPolynomials](https://discourse.julialang.org/t/zygote-differentiation-with-dynamicpolynomials/90064)

<div class="topic-metadata">

**Author:** [@mhar](https://discourse.julialang.org/u/mhar)\
**Replies:** 0\
**Last updated:** [November 10, 2022, 6:12pm UTC](https://discourse.julialang.org/t/zygote-differentiation-with-dynamicpolynomials/90064 "2022-11-10T18:12:47Z")

</div>

My primary question is: I want to write a custom adjoint for something that has a similar structure to the following, but I keep getting errors with my attempts. I think I am getting the types wrong. using DynamicPolyno…

---

## [Lambdify, no method matching getindex](https://discourse.julialang.org/t/lambdify-no-method-matching-getindex/90025)

<div class="topic-metadata">

**Author:** [@xyli](https://discourse.julialang.org/u/xyli)\
**Replies:** 2\
**Last updated:** [November 10, 2022, 6:03pm UTC](https://discourse.julialang.org/t/lambdify-no-method-matching-getindex/90025 "2022-11-10T18:03:49Z")

</div>

Does anyone know how to resolve the following issue of “lamdify”? julia\> using SymPy julia\> @syms x, y, z julia\> xx = zeros(Sym, 2, 1) julia\> xx\[1\] = xyz julia\> xx\[2\] = x^2 julia\> xx = xx.\*\[1,1\] julia\> fxx = lambd…

---

## [How to write Plots/Makie recipes for a module without having it precompile](https://discourse.julialang.org/t/how-to-write-plots-makie-recipes-for-a-module-without-having-it-precompile/89717)

<div class="topic-metadata">

**Author:** [@danilo-bc](https://discourse.julialang.org/u/danilo-bc)\
**Replies:** 3\
**Last updated:** [November 10, 2022, 5:33pm UTC](https://discourse.julialang.org/t/how-to-write-plots-makie-recipes-for-a-module-without-having-it-precompile/89717 "2022-11-10T17:33:54Z")

</div>

I’m trying to create a Julia modules for simple mathematical functions, but I want to separate code which calculates from code which show stuff on the screen (plot recipes). I want each mathematical domain to be in thei…

---

## [Proposal: JuliaCN translation program (English -\> Chinese) and call for ideas](https://discourse.julialang.org/t/proposal-juliacn-translation-program-english-chinese-and-call-for-ideas/90059)

<div class="topic-metadata">

**Author:** [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Replies:** 1\
**Last updated:** [November 10, 2022, 5:27pm UTC](https://discourse.julialang.org/t/proposal-juliacn-translation-program-english-chinese-and-call-for-ideas/90059 "2022-11-10T17:27:32Z")

</div>

I want to propose a long-term English-to-Chinese translation program to cover anything that is stable and useful to Chinese Julia users. The Chinese version can be found at Julia 技术翻译计划 —— 征集与赞助 - 中文文档 - Julia中文社区 A lo…

---

## [\[Turing.jl\] Warning: The current proposal will be rejected due to numerical error(s)](https://discourse.julialang.org/t/turing-jl-warning-the-current-proposal-will-be-rejected-due-to-numerical-error-s/72396)

<div class="topic-metadata">

**Author:** [@weiqi](https://discourse.julialang.org/u/weiqi)\
**Replies:** 2\
**Last updated:** [November 10, 2022, 4:43pm UTC](https://discourse.julialang.org/t/turing-jl-warning-the-current-proposal-will-be-rejected-due-to-numerical-error-s/72396 "2022-11-10T16:43:26Z")

</div>

I am running MCMC with Turing.jl for an ODE model. The model contains about 111 parameters. I have noticed that the sampler constantly gives the following warning due to the truncated distribution for prior. Wondering i…

---

## [⊗ in using](https://discourse.julialang.org/t/in-using/90056)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [November 10, 2022, 4:29pm UTC](https://discourse.julialang.org/t/in-using/90056 "2022-11-10T16:29:33Z")

</div>

I am trying to make using TensorCast: ⊗ work. For the above I get an LoadError: "invalid \\"using\\" statement: expected identifier". I tried various combinations of : and ()s, what’s the right way? Eg import Base: + jus…

---

## [Avoiding module \_\_init\_\_ being called multiple times](https://discourse.julialang.org/t/avoiding-module-init-being-called-multiple-times/83298)

<div class="topic-metadata">

**Author:** [@Amval](https://discourse.julialang.org/u/Amval)\
**Replies:** 3\
**Last updated:** [November 10, 2022, 4:28pm UTC](https://discourse.julialang.org/t/avoiding-module-init-being-called-multiple-times/83298 "2022-11-10T16:28:27Z")

</div>

Hello, I have been porting a web service I have to Genie. I have found the default structure very helpful to organize my project (auto-loading of libs, controller default structure, etc). I have the following problem: …

---

## [Makie - Observables and removing widgets](https://discourse.julialang.org/t/makie-observables-and-removing-widgets/88485)

<div class="topic-metadata">

**Author:** [@lmshk](https://discourse.julialang.org/u/lmshk)\
**Replies:** 2\
**Last updated:** [November 10, 2022, 4:14pm UTC](https://discourse.julialang.org/t/makie-observables-and-removing-widgets/88485 "2022-11-10T16:14:47Z")

</div>

I am trying to build an interactive figure (GLMakie v0.6.13, Makie v0.17.13) where the specific layout, including the existence of various subplots, depends on the data. I would like to use Makie’s predefined widgets to …

---

## [How to specify vector MTK states or parameters to ODESystem call? (ODESystem(eq,t,var,par))](https://discourse.julialang.org/t/how-to-specify-vector-mtk-states-or-parameters-to-odesystem-call-odesystem-eq-t-var-par/89844)

<div class="topic-metadata">

**Author:** [@jondavis847](https://discourse.julialang.org/u/jondavis847)\
**Replies:** 2\
**Last updated:** [November 10, 2022, 4:13pm UTC](https://discourse.julialang.org/t/how-to-specify-vector-mtk-states-or-parameters-to-odesystem-call-odesystem-eq-t-var-par/89844 "2022-11-10T16:13:48Z")

</div>

Hey folks, I’m working to implement a simple vectorized step function using callbacks as a learning exercise. I was able to create a simple scalar step function: function step(time;name) x = @variables u(t)=0 \[…

---

## [Increase the speed of For Loop in julia](https://discourse.julialang.org/t/increase-the-speed-of-for-loop-in-julia/89985)

<div class="topic-metadata">

**Author:** [@xspeng](https://discourse.julialang.org/u/xspeng)\
**Replies:** 9\
**Last updated:** [November 10, 2022, 2:36pm UTC](https://discourse.julialang.org/t/increase-the-speed-of-for-loop-in-julia/89985 "2022-11-10T14:36:30Z")

</div>

When I solve the ODEs, I try to write the 136 equations with a for loop, which makes the program more clean. However, compare with the initial program (in which I expand each equation completely), the new program needs t…

---

## [How to read data from a file in a multithreading loop](https://discourse.julialang.org/t/how-to-read-data-from-a-file-in-a-multithreading-loop/89925)

<div class="topic-metadata">

**Author:** [@NikoBiele](https://discourse.julialang.org/u/NikoBiele)\
**Replies:** 7\
**Last updated:** [November 10, 2022, 2:13pm UTC](https://discourse.julialang.org/t/how-to-read-data-from-a-file-in-a-multithreading-loop/89925 "2022-11-10T14:13:05Z")

</div>

Hi Julia community, My name is Nikolaj, I am not an expert on Julia, but I really like the syntax and speed of Julia. I am using Julia to determine the wavelength dependent absorption coefficient of CO2, based on line-…

---

## [Plotting functions of the DE solutions](https://discourse.julialang.org/t/plotting-functions-of-the-de-solutions/89837)

<div class="topic-metadata">

**Author:** [@Sh\_166](https://discourse.julialang.org/u/Sh_166)\
**Replies:** 1\
**Last updated:** [November 10, 2022, 2:08pm UTC](https://discourse.julialang.org/t/plotting-functions-of-the-de-solutions/89837 "2022-11-10T14:08:07Z")

</div>

Hi, so, I was trying to plot a function that takes the solution of a DE as it’s arguments. In particular, these are the equations I solved, and I wanted to plot something like the normal modes (linear combinations of the…

---

## [Could not reach pkg.julialang.org](https://discourse.julialang.org/t/could-not-reach-pkg-julialang-org/90048)

<div class="topic-metadata">

**Author:** [@YongHee-Kim](https://discourse.julialang.org/u/YongHee-Kim)\
**Replies:** 2\
**Last updated:** [November 10, 2022, 2:04pm UTC](https://discourse.julialang.org/t/could-not-reach-pkg-julialang-org/90048 "2022-11-10T14:04:41Z")

</div>

This has been happening to me for few months. I can manually update general registry from ./julia/registries but this is inconvenient. Does anyone having same issue as me?

---

## [How to reduce type-instability performance issues in general problem interfaces?](https://discourse.julialang.org/t/how-to-reduce-type-instability-performance-issues-in-general-problem-interfaces/90045)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 9\
**Last updated:** [November 10, 2022, 2:02pm UTC](https://discourse.julialang.org/t/how-to-reduce-type-instability-performance-issues-in-general-problem-interfaces/90045 "2022-11-10T14:02:44Z")

</div>

I am trying to write a simple interface to define and solve a specific class of problem. The problems are defined by sets of functions and sets of variables. There can be a mix of function types, and a mix of variable ty…

---

## [How to plot a function with complex values?](https://discourse.julialang.org/t/how-to-plot-a-function-with-complex-values/90026)

<div class="topic-metadata">

**Author:** [@maoc](https://discourse.julialang.org/u/maoc)\
**Replies:** 3\
**Last updated:** [November 10, 2022, 12:46pm UTC](https://discourse.julialang.org/t/how-to-plot-a-function-with-complex-values/90026 "2022-11-10T12:46:42Z")

</div>

I’d like to plot a function on the complex plane, but I’m not very familiar with complex numbers in Julia anymore. How to plot h\_z(x)= e^{i \\langle z,x \\rangle}- 1 when z is fixed? For example, z=(1,1). How to visualiz…

---

## [Impact of specifying input types on function performance, when referencing arguments from Vector{Any}](https://discourse.julialang.org/t/impact-of-specifying-input-types-on-function-performance-when-referencing-arguments-from-vector-any/89993)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 16\
**Last updated:** [November 10, 2022, 1:07pm UTC](https://discourse.julialang.org/t/impact-of-specifying-input-types-on-function-performance-when-referencing-arguments-from-vector-any/89993 "2022-11-10T13:07:58Z")

</div>

I have a performance issue I’d like to solve. I need to reference some function arguments from a Vector{Any} array. Most of the time this is incurring an expensive allocation penalty. However, when I call an explicitly t…

---

## [Increase wordwrap column in VSCode for Julia only](https://discourse.julialang.org/t/increase-wordwrap-column-in-vscode-for-julia-only/90047)

<div class="topic-metadata">

**Author:** [@amca01](https://discourse.julialang.org/u/amca01)\
**Replies:** 0\
**Last updated:** [November 10, 2022, 12:37pm UTC](https://discourse.julialang.org/t/increase-wordwrap-column-in-vscode-for-julia-only/90047 "2022-11-10T12:37:59Z")

</div>

In my IJulia cells in VSCode, lines are always wrapped at column 80, which is the system default, and which works for some other editing I do (such as LaTeX). But for Julia, 80 columns is too narrow; I’d much prefer to …

---

## [Shapes from geojson on geo map with Plotly](https://discourse.julialang.org/t/shapes-from-geojson-on-geo-map-with-plotly/89777)

<div class="topic-metadata">

**Author:** [@lgo](https://discourse.julialang.org/u/lgo)\
**Replies:** 5\
**Last updated:** [November 10, 2022, 12:10pm UTC](https://discourse.julialang.org/t/shapes-from-geojson-on-geo-map-with-plotly/89777 "2022-11-10T12:10:55Z")

</div>

I want to plot a geojson with multiple geojsons as a geo map with Plotly. I tried to convert an existing Python example to Julia but without success. The code below is just one example and I’ve also tested the same struc…

---

## [Older versions of custom functions are saved as methods](https://discourse.julialang.org/t/older-versions-of-custom-functions-are-saved-as-methods/89935)

<div class="topic-metadata">

**Author:** [@mylo19](https://discourse.julialang.org/u/mylo19)\
**Replies:** 6\
**Last updated:** [November 10, 2022, 10:57am UTC](https://discourse.julialang.org/t/older-versions-of-custom-functions-are-saved-as-methods/89935 "2022-11-10T10:57:13Z")

</div>

This may be simple, but as I’m now getting used to multiple dispatch, I want to be sure that I understand how to work properly. I’m writing some custom functions for my project. Let’s say I have the following function: …

---

## [How to document struct fields programmatically](https://discourse.julialang.org/t/how-to-document-struct-fields-programmatically/90042)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 0\
**Last updated:** [November 10, 2022, 10:21am UTC](https://discourse.julialang.org/t/how-to-document-struct-fields-programmatically/90042 "2022-11-10T10:21:12Z")

</div>

Is there any way to add documentation to fields in my struct programmatically (after defining the struct)? "MyStruct doc" struct MyStruct "MyStruct.a doc" a::Float64 end # This has docs for ?MyStruct.a "MyStruc…

---

## [PlotlyJS Heatmap change colors to grayscale](https://discourse.julialang.org/t/plotlyjs-heatmap-change-colors-to-grayscale/89973)

<div class="topic-metadata">

**Author:** [@JorizovdZ](https://discourse.julialang.org/u/JorizovdZ)\
**Replies:** 4\
**Last updated:** [November 10, 2022, 8:20am UTC](https://discourse.julialang.org/t/plotlyjs-heatmap-change-colors-to-grayscale/89973 "2022-11-10T08:20:30Z")

</div>

I want to transform my thermal heatmap to grayscale. I tried different options and arguments, though it keeps returning the standard color format. I’m using the packages below with versions and ran the attached code belo…

---

## [Where is \`isa\` defined](https://discourse.julialang.org/t/where-is-isa-defined/90015)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 5\
**Last updated:** [November 10, 2022, 7:24am UTC](https://discourse.julialang.org/t/where-is-isa-defined/90015 "2022-11-10T07:24:20Z")

</div>

julia\> @less 1 isa Int ERROR: could not determine location of method definition How else can I locate the method definition? Grepping for isa is tricky.

---

## [How to see the color layers of an image in Julia](https://discourse.julialang.org/t/how-to-see-the-color-layers-of-an-image-in-julia/21513)

<div class="topic-metadata">

**Author:** [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)\
**Replies:** 3\
**Last updated:** [November 10, 2022, 6:43am UTC](https://discourse.julialang.org/t/how-to-see-the-color-layers-of-an-image-in-julia/21513 "2022-11-10T06:43:38Z")

</div>

I want to see the layers of color that my image has, in this case it is toy occupying the image of the mandril, and I want to see all the layers of color that that image has. Can somebody help me?

---

## [Is there a way to pass a list of packages to \`using\` in a similar way as \`Pkg.add()\`](https://discourse.julialang.org/t/is-there-a-way-to-pass-a-list-of-packages-to-using-in-a-similar-way-as-pkg-add/90012)

<div class="topic-metadata">

**Author:** [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Replies:** 8\
**Last updated:** [November 10, 2022, 6:31am UTC](https://discourse.julialang.org/t/is-there-a-way-to-pass-a-list-of-packages-to-using-in-a-similar-way-as-pkg-add/90012 "2022-11-10T06:31:51Z")

</div>

Is there a way to pass a list of packages to using in a similar way as Pkg.add() ? This works: package\_names = \["DateFormats", "Statistics"\] using Pkg Pkg.add(package\_names) but I can’t do this using(package\_names) …

---

## [Simplest way to start Julia with threading on MacOS](https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016)

<div class="topic-metadata">

**Author:** [@rasmushenningsson](https://discourse.julialang.org/u/rasmushenningsson)\
**Replies:** 4\
**Last updated:** [November 10, 2022, 4:50am UTC](https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016 "2022-11-10T04:50:51Z")

</div>

Simplest way to start Julia with threading on MacOS Hi! I have a collaborator with a Mac computer but without admin rights. Julia is installed on the computer, but not added to path. Now, I want to find the simplest …

---

## [Solve Raytrace ODE with events](https://discourse.julialang.org/t/solve-raytrace-ode-with-events/90022)

<div class="topic-metadata">

**Author:** [@jddorellanao](https://discourse.julialang.org/u/jddorellanao)\
**Replies:** 1\
**Last updated:** [November 10, 2022, 3:08am UTC](https://discourse.julialang.org/t/solve-raytrace-ode-with-events/90022 "2022-11-10T03:08:04Z")

</div>

Hi community: Forgive my boldness. I am new to Julia, and the reason I am using it is because how fast it is. I come from Python, and I have a function for raytracing (below). I need to migrate it to Julia, but I’m not …

---

## [Ignore part of the gradient calculation inside differential equation model](https://discourse.julialang.org/t/ignore-part-of-the-gradient-calculation-inside-differential-equation-model/90011)

<div class="topic-metadata">

**Author:** [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Replies:** 0\
**Last updated:** [November 9, 2022, 11:22pm UTC](https://discourse.julialang.org/t/ignore-part-of-the-gradient-calculation-inside-differential-equation-model/90011 "2022-11-09T23:22:13Z")

</div>

I am trying to differentiate the solution of a differential equation using DifferentialEquation with respect to some parameters but ignoring parts of the calculation of the gradient for being redundant or computationally…

---

## [Catch warnings](https://discourse.julialang.org/t/catch-warnings/29603)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 2\
**Last updated:** [November 9, 2022, 10:36pm UTC](https://discourse.julialang.org/t/catch-warnings/29603 "2022-11-09T22:36:46Z")

</div>

How could I catch if a block of code issues some warning? Something like try - catch for warnings. Or alternatively, how make warnings throw an error?

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

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