# Latest

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

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

**Page:** 793

---

## [Performance hit in generated function using dispatching on argument](https://discourse.julialang.org/t/performance-hit-in-generated-function-using-dispatching-on-argument/94011)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 0\
**Last updated:** [February 3, 2023, 8:05pm UTC](https://discourse.julialang.org/t/performance-hit-in-generated-function-using-dispatching-on-argument/94011 "2023-02-03T20:05:51Z")

</div>

I’m trying to use generated functions since I need to loop over a sum of elements from different vectors, but the vectors that are used in the sum depend on the type of one of the arguments. The last argument is an insta…

---

## [Interpolate a 3D array](https://discourse.julialang.org/t/interpolate-a-3d-array/93885)

<div class="topic-metadata">

**Author:** [@Dale\_James\_Black](https://discourse.julialang.org/u/Dale_James_Black)\
**Replies:** 19\
**Last updated:** [February 3, 2023, 6:58pm UTC](https://discourse.julialang.org/t/interpolate-a-3d-array/93885 "2023-02-03T18:58:04Z")

</div>

If I have a 3D array along with a unit normal vector and point for a plane that intersects that array, how would I use Interpolations.jl to create a new 3D array that is the same size as the original array but where all …

---

## [Possible Performance Regression for Loops on 1.9?](https://discourse.julialang.org/t/possible-performance-regression-for-loops-on-1-9/93994)

<div class="topic-metadata">

**Author:** [@jacobxk](https://discourse.julialang.org/u/jacobxk)\
**Replies:** 12\
**Last updated:** [February 3, 2023, 6:23pm UTC](https://discourse.julialang.org/t/possible-performance-regression-for-loops-on-1-9/93994 "2023-02-03T18:23:02Z")

</div>

There is a function in Bogumił Kamiński’s book Julia for Data Analysis(page 7) with the purpose to show off the optimizations done by Julia compiler. function sum\_n(n) s = 0 for i in 1:n s += i end …

---

## [WriteVTK node numbering for 27 node Lagrange Hexahedron](https://discourse.julialang.org/t/writevtk-node-numbering-for-27-node-lagrange-hexahedron/93698)

<div class="topic-metadata">

**Author:** [@jman87](https://discourse.julialang.org/u/jman87)\
**Replies:** 17\
**Last updated:** [February 3, 2023, 6:16pm UTC](https://discourse.julialang.org/t/writevtk-node-numbering-for-27-node-lagrange-hexahedron/93698 "2023-02-03T18:16:21Z")

</div>

@jipolanco I’m trying to export a mesh containing 27-node Lagrange Hexahedron elements using WriteVTK, but I can’t seem to get the node ordering correct. Another ParaView user suggested I get the ordering from ParaView…

---

## [Speed of PyCall and Python wrapper vs. Julia wrapper](https://discourse.julialang.org/t/speed-of-pycall-and-python-wrapper-vs-julia-wrapper/94000)

<div class="topic-metadata">

**Author:** [@MikeB](https://discourse.julialang.org/u/MikeB)\
**Replies:** 2\
**Last updated:** [February 3, 2023, 6:05pm UTC](https://discourse.julialang.org/t/speed-of-pycall-and-python-wrapper-vs-julia-wrapper/94000 "2023-02-03T18:05:08Z")

</div>

I’m looking at using a C++ library that already has a Python wrapper. I’m curious if there is a speed penalty using Python/PyCall vs. writing my own Julia wrapper.

---

## [Has anyone built a graph database of all the dependencies in the Julia General registry?](https://discourse.julialang.org/t/has-anyone-built-a-graph-database-of-all-the-dependencies-in-the-julia-general-registry/68141)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [February 3, 2023, 4:45pm UTC](https://discourse.julialang.org/t/has-anyone-built-a-graph-database-of-all-the-dependencies-in-the-julia-general-registry/68141 "2023-02-03T16:45:33Z")

</div>

E.g. when I go to R’s CRAN I can see reverse suggest etc meaning package A was suggested by package B so essentially some kind of graph is built for package dependencies. Wonder if such a thing already exists for Julia. …

---

## [Is there a tool similar to jupyter-notebook, but not dependent on python?](https://discourse.julialang.org/t/is-there-a-tool-similar-to-jupyter-notebook-but-not-dependent-on-python/93847)

<div class="topic-metadata">

**Author:** [@MJulia](https://discourse.julialang.org/u/MJulia)\
**Replies:** 15\
**Last updated:** [February 3, 2023, 4:30pm UTC](https://discourse.julialang.org/t/is-there-a-tool-similar-to-jupyter-notebook-but-not-dependent-on-python/93847 "2023-02-03T16:30:45Z")

</div>

Pluto.jl is close, but it is not feature comparable to jupyter-notebook. Jupyter-notebook saves results (text outputs and figures) in the notebook, but it requires a python environment.

---

## [Equivalent Circuit Optimization](https://discourse.julialang.org/t/equivalent-circuit-optimization/93907)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 9\
**Last updated:** [February 3, 2023, 4:30pm UTC](https://discourse.julialang.org/t/equivalent-circuit-optimization/93907 "2023-02-03T16:30:45Z")

</div>

Hi, yesterday I worked on a script provided by Maxime to find an optimal solution for the parameters of an equivalent circuit. For this purpose there is the established python package impedance.py, but this package fai…

---

## [MLJ: RootMeanSquaredLogError() returns Inf instead of actual score](https://discourse.julialang.org/t/mlj-rootmeansquaredlogerror-returns-inf-instead-of-actual-score/93995)

<div class="topic-metadata">

**Author:** [@clouedoc](https://discourse.julialang.org/u/clouedoc)\
**Replies:** 0\
**Last updated:** [February 3, 2023, 3:25pm UTC](https://discourse.julialang.org/t/mlj-rootmeansquaredlogerror-returns-inf-instead-of-actual-score/93995 "2023-02-03T15:25:20Z")

</div>

Hello, I’m trying to build a model for the Store Sales Kaggle Competition. I’ve tried to build a super-simple model that only takes two-three features and submit my predictions to Kaggle. The numbers didn’t correspond …

---

## [Problems with starting circuitscape from R package JuliaCall](https://discourse.julialang.org/t/problems-with-starting-circuitscape-from-r-package-juliacall/93965)

<div class="topic-metadata">

**Author:** [@Lfreitas](https://discourse.julialang.org/u/Lfreitas)\
**Replies:** 3\
**Last updated:** [February 3, 2023, 3:15pm UTC](https://discourse.julialang.org/t/problems-with-starting-circuitscape-from-r-package-juliacall/93965 "2023-02-03T15:15:55Z")

</div>

Hi, I’m brandnew to julia and I am facing a hard time while trying to run my analysis. The situation is that I’m trying to run the package Circuitscape using JuliaCall within R in a custom docker container and I kept ge…

---

## [(More) Debugging of Statically Compiled Code](https://discourse.julialang.org/t/more-debugging-of-statically-compiled-code/93987)

<div class="topic-metadata">

**Author:** [@wave\_and\_matter](https://discourse.julialang.org/u/wave_and_matter)\
**Replies:** 1\
**Last updated:** [February 3, 2023, 3:00pm UTC](https://discourse.julialang.org/t/more-debugging-of-statically-compiled-code/93987 "2023-02-03T15:00:53Z")

</div>

After having successfully implemented a first algorithm of mine in statically compiled julia i now struggle with debugging of a second one. Since the error messages or reasons for crashes from statically compiled julia …

---

## [How to initialize a unit with Unitful.jl when reading values and units from a file?](https://discourse.julialang.org/t/how-to-initialize-a-unit-with-unitful-jl-when-reading-values-and-units-from-a-file/93978)

<div class="topic-metadata">

**Author:** [@RPS](https://discourse.julialang.org/u/RPS)\
**Replies:** 2\
**Last updated:** [February 3, 2023, 2:27pm UTC](https://discourse.julialang.org/t/how-to-initialize-a-unit-with-unitful-jl-when-reading-values-and-units-from-a-file/93978 "2023-02-03T14:27:59Z")

</div>

Hello, I’m parsing a file defining values and corresponding units, for which I would like to initialize unitful variables in julia. Currently, it is not clear to me how to use the @u\_str macro, when the value and unit a…

---

## [Function structure for ForwardDiff jacobian](https://discourse.julialang.org/t/function-structure-for-forwarddiff-jacobian/93991)

<div class="topic-metadata">

**Author:** [@rakshith95](https://discourse.julialang.org/u/rakshith95)\
**Replies:** 0\
**Last updated:** [February 3, 2023, 2:22pm UTC](https://discourse.julialang.org/t/function-structure-for-forwarddiff-jacobian/93991 "2023-02-03T14:22:00Z")

</div>

Hello, I’m working with images, and I’m seeing some strange behaviour on Jacobian computation, so I suspect my function formulation is incorrect. I have two patches in an image, and my function F which returns a vector…

---

## [Base.accumulate! seems slow due to keyword argument handling, can it be sped up?](https://discourse.julialang.org/t/base-accumulate-seems-slow-due-to-keyword-argument-handling-can-it-be-sped-up/93650)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 3\
**Last updated:** [February 3, 2023, 2:11pm UTC](https://discourse.julialang.org/t/base-accumulate-seems-slow-due-to-keyword-argument-handling-can-it-be-sped-up/93650 "2023-02-03T14:11:22Z")

</div>

Before I found accumulate, I had written a simple implementation. Then I was informed about accumulate! and tried using that. @btime’ing it showed allocations and that it took nearly twice as long to run as the implement…

---

## [Macro or DSL for easier DBInterface usage?](https://discourse.julialang.org/t/macro-or-dsl-for-easier-dbinterface-usage/93942)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 6\
**Last updated:** [February 3, 2023, 2:02pm UTC](https://discourse.julialang.org/t/macro-or-dsl-for-easier-dbinterface-usage/93942 "2023-02-03T14:02:31Z")

</div>

DBInterface is great for using SQL and database queries. However, SQL queries can get lengthy, and the mixing of SQL and Julia code is a bit ugly. I am wondering if there are packages that would replace lines like this …

---

## [JSON3 to mutable Dict{String,Any}](https://discourse.julialang.org/t/json3-to-mutable-dict-string-any/93443)

<div class="topic-metadata">

**Author:** [@JesperMartinsson](https://discourse.julialang.org/u/JesperMartinsson)\
**Replies:** 3\
**Last updated:** [February 3, 2023, 1:57pm UTC](https://discourse.julialang.org/t/json3-to-mutable-dict-string-any/93443 "2023-02-03T13:57:26Z")

</div>

I’m using JSON3 to parse an input that can be either a json or an array of json string. I want to convert the output of JSON3.read to either a mutable Dict{String,Any} or Array{Dict{String,Any}}, respectively. I see that…

---

## [Possible performance regression in 1.9 / StaticArrays](https://discourse.julialang.org/t/possible-performance-regression-in-1-9-staticarrays/93422)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 11\
**Last updated:** [February 3, 2023, 1:07pm UTC](https://discourse.julialang.org/t/possible-performance-regression-in-1-9-staticarrays/93422 "2023-02-03T13:07:59Z")

</div>

This is a followup from: Accelerating an N^2 nested loop - #14 by lmiq I have the following code, which tries to compute some sort of acceleration for particles. There is an implementation based on standard 1D arrays to…

---

## [Why am I unable to precompile my project?](https://discourse.julialang.org/t/why-am-i-unable-to-precompile-my-project/93832)

<div class="topic-metadata">

**Author:** [@kannan975](https://discourse.julialang.org/u/kannan975)\
**Replies:** 7\
**Last updated:** [January 31, 2023, 8:54pm UTC](https://discourse.julialang.org/t/why-am-i-unable-to-precompile-my-project/93832 "2023-01-31T20:54:11Z")

</div>

Hi, I am quite new to Julia and I am trying to working on and developing a package that my colleague has made. Following the instructions on pkgdocs, I used dev to clone the project followed by activate . and instantia…

---

## [How to benchmark in-place functions?](https://discourse.julialang.org/t/how-to-benchmark-in-place-functions/36493)

<div class="topic-metadata">

**Author:** [@mlanghinrichs](https://discourse.julialang.org/u/mlanghinrichs)\
**Replies:** 8\
**Last updated:** [February 3, 2023, 12:32pm UTC](https://discourse.julialang.org/t/how-to-benchmark-in-place-functions/36493 "2023-02-03T12:32:13Z")

</div>

Hi all, I wondered how to benchmark functions correctly that modify always the same input in-place. In particular, using the @btime macro of BenchmarkTools.jl. For example consider the following minimal code: using Ben…

---

## [Function that returns 2 BigInts](https://discourse.julialang.org/t/function-that-returns-2-bigints/93968)

<div class="topic-metadata">

**Author:** [@x13420x](https://discourse.julialang.org/u/x13420x)\
**Replies:** 10\
**Last updated:** [February 3, 2023, 12:00pm UTC](https://discourse.julialang.org/t/function-that-returns-2-bigints/93968 "2023-02-03T12:00:37Z")

</div>

I am having problems with global variables not being visible inside functions also within the main code. So I would like to return 2 BigInts from a function but I dont know how. When I try x = randomfunction() then I g…

---

## [Based on which packages is Base.Threads built?](https://discourse.julialang.org/t/based-on-which-packages-is-base-threads-built/93930)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 4\
**Last updated:** [February 3, 2023, 12:01pm UTC](https://discourse.julialang.org/t/based-on-which-packages-is-base-threads-built/93930 "2023-02-03T12:01:47Z")

</div>

I am happy to use the functions in Base.Threads, and I am carious to know that based on which packages this Base.Threads is built? is it OneAPI, OpenMP, etc.?

---

## [\[SOLVED\] Precompilation of OrdinaryDiffEq fails in julia 1.8.5 on manjaro (arch) linux](https://discourse.julialang.org/t/solved-precompilation-of-ordinarydiffeq-fails-in-julia-1-8-5-on-manjaro-arch-linux/93979)

<div class="topic-metadata">

**Author:** [@SeverinBang](https://discourse.julialang.org/u/SeverinBang)\
**Replies:** 2\
**Last updated:** [February 3, 2023, 11:53am UTC](https://discourse.julialang.org/t/solved-precompilation-of-ordinarydiffeq-fails-in-julia-1-8-5-on-manjaro-arch-linux/93979 "2023-02-03T11:53:51Z")

</div>

Dear Community, I am relatively new to julia and want to model ordinary differential equations. Installing the OrdinaryDiffEq package failed, and the output of julia\> import Pkg; Pkg.precompile() is: julia\> import Pkg;…

---

## [GTK4.jl: Canvas not visible when pushed to a box](https://discourse.julialang.org/t/gtk4-jl-canvas-not-visible-when-pushed-to-a-box/93959)

<div class="topic-metadata">

**Author:** [@sarath-menon](https://discourse.julialang.org/u/sarath-menon)\
**Replies:** 1\
**Last updated:** [February 3, 2023, 11:32am UTC](https://discourse.julialang.org/t/gtk4-jl-canvas-not-visible-when-pushed-to-a-box/93959 "2023-02-03T11:32:02Z")

</div>

Hello. I am trying to display a canvas GTK4.jl. The documentation example works. But when I push the canvas to a GTKBox and push the box to the window (instead of pushing the canvas directly to the window), the canvas …

---

## [QHull and Polyhedra give different volume estimates](https://discourse.julialang.org/t/qhull-and-polyhedra-give-different-volume-estimates/74487)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 0\
**Last updated:** [January 12, 2022, 1:33pm UTC](https://discourse.julialang.org/t/qhull-and-polyhedra-give-different-volume-estimates/74487 "2022-01-12T13:33:45Z")

</div>

I am trying to figure out why QHull and Polyhedra give different volume estimates for the same inputs. They agree in the 2D case, but diverge in the 3D case. Results 2D Polyhedra.jl: 0.982 QHull.jl: 0.982 3D Polyhedra.…

---

## [LoadError: @atomic modify expression missing field access](https://discourse.julialang.org/t/loaderror-atomic-modify-expression-missing-field-access/93973)

<div class="topic-metadata">

**Author:** [@bcsj](https://discourse.julialang.org/u/bcsj)\
**Replies:** 1\
**Last updated:** [February 3, 2023, 8:18am UTC](https://discourse.julialang.org/t/loaderror-atomic-modify-expression-missing-field-access/93973 "2023-02-03T08:18:35Z")

</div>

I’ve been trying to write a reduction kernel using \[1\] as a blueprint to work from, but I kept getting this error message: LoadError: @atomic modify expression missing field access I couldn’t understand why, and in t…

---

## [How to qualify some numerical array type as argument](https://discourse.julialang.org/t/how-to-qualify-some-numerical-array-type-as-argument/93969)

<div class="topic-metadata">

**Author:** [@jinfreedom](https://discourse.julialang.org/u/jinfreedom)\
**Replies:** 5\
**Last updated:** [February 3, 2023, 8:14am UTC](https://discourse.julialang.org/t/how-to-qualify-some-numerical-array-type-as-argument/93969 "2023-02-03T08:14:55Z")

</div>

Hi, I’m implementing a function that initializes an array of certain type specified by a type parameter, which I considered using ArrayInit(ARR::Type{A{V}},siz) where {A\<:AbstractArray, V\<:Number} which does not work: …

---

## [Automatic gradient ∼10x slower to evaluate than the primal computation](https://discourse.julialang.org/t/automatic-gradient-10x-slower-to-evaluate-than-the-primal-computation/93925)

<div class="topic-metadata">

**Author:** [@user22](https://discourse.julialang.org/u/user22)\
**Replies:** 2\
**Last updated:** [February 3, 2023, 6:15am UTC](https://discourse.julialang.org/t/automatic-gradient-10x-slower-to-evaluate-than-the-primal-computation/93925 "2023-02-03T06:15:44Z")

</div>

I need to evaluate a basic dense and a few-layer neural network with up to tens of thousands of inputs at once. The outputs will be then forwarded to another function, which returns a scalar. However, the performance of …

---

## [Globals / Constants Act Differently Depending on Use?](https://discourse.julialang.org/t/globals-constants-act-differently-depending-on-use/93933)

<div class="topic-metadata">

**Author:** [@dkzwart](https://discourse.julialang.org/u/dkzwart)\
**Replies:** 2\
**Last updated:** [February 2, 2023, 5:38pm UTC](https://discourse.julialang.org/t/globals-constants-act-differently-depending-on-use/93933 "2023-02-02T17:38:45Z")

</div>

I’ve been doing a lot of reading on Constants and Globals, and I realize I really don’t understand what I am reading. Having said that, can you all help me understand why var1 is undefined in the function? It seems to be…

---

## [Clever way to sum](https://discourse.julialang.org/t/clever-way-to-sum/93967)

<div class="topic-metadata">

**Author:** [@Gattu\_Mytraya](https://discourse.julialang.org/u/Gattu_Mytraya)\
**Replies:** 4\
**Last updated:** [February 3, 2023, 2:54am UTC](https://discourse.julialang.org/t/clever-way-to-sum/93967 "2023-02-03T02:54:19Z")

</div>

I was wondering whether there’s an efficient way to calculate sums of the form: Sn = a1-n + a2-n + … + an-n Currently, I’m just doing something like: sum(x-\>x^(-n), a) I would require all the sums from 1 to n. The e…

---

## [Call FastClosures.jl \`@closure\` in Array Comprehensions?](https://discourse.julialang.org/t/call-fastclosures-jl-closure-in-array-comprehensions/93622)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 2\
**Last updated:** [February 3, 2023, 1:44am UTC](https://discourse.julialang.org/t/call-fastclosures-jl-closure-in-array-comprehensions/93622 "2023-02-03T01:44:42Z")

</div>

Like with any closure, array comprehensions present a performance challenge if they capture a variable whose identifier is reassigned: julia\> using BenchmarkTools julia\> const a=\[1:1000;\]; julia\> @btime let b=a; \[b\[x\]…

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

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