# Latest

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

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

**Page:** 987

---

## [How can I copy a namedtuple or all objects within a namedtuple?](https://discourse.julialang.org/t/how-can-i-copy-a-namedtuple-or-all-objects-within-a-namedtuple/84016)

<div class="topic-metadata">

**Author:** [@JonasG](https://discourse.julialang.org/u/JonasG)\
**Replies:** 4\
**Last updated:** [July 10, 2022, 11:11am UTC](https://discourse.julialang.org/t/how-can-i-copy-a-namedtuple-or-all-objects-within-a-namedtuple/84016 "2022-07-10T11:11:53Z")

</div>

So this should be simple (sorry if it was asked before): I have a namedtuple that saves a bunch of results. Suppose this is: init\_results = (result1 = collect(1:10), result2 = collect(11:20)) How can I copy init\_result…

---

## [Error reordering Schur decomposition](https://discourse.julialang.org/t/error-reordering-schur-decomposition/83948)

<div class="topic-metadata">

**Author:** [@AS90](https://discourse.julialang.org/u/AS90)\
**Replies:** 3\
**Last updated:** [July 10, 2022, 8:28am UTC](https://discourse.julialang.org/t/error-reordering-schur-decomposition/83948 "2022-07-10T08:28:12Z")

</div>

Hello. I wish to suitably reorder the eigenvalues resulting from a generalised Schur matrix decomposition in an ascending fashion. This is the code. using LinearAlgebra A=randn(3, 3); B=randn(3, 3); (S, T, Qt, Z, eS, eT…

---

## [Performance of recursive function](https://discourse.julialang.org/t/performance-of-recursive-function/83961)

<div class="topic-metadata">

**Author:** [@Fabrice\_Rosay](https://discourse.julialang.org/u/Fabrice_Rosay)\
**Replies:** 12\
**Last updated:** [July 10, 2022, 7:58am UTC](https://discourse.julialang.org/t/performance-of-recursive-function/83961 "2022-07-10T07:58:48Z")

</div>

Hi, I have the following recursive function to calculate the number of positions in a game. All functions inside perft (play, gen\_moves, isOver) are non allocating, yet perft allocates a lot of memory. Using the track…

---

## [REPL tab completion](https://discourse.julialang.org/t/repl-tab-completion/84000)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 2\
**Last updated:** [July 10, 2022, 7:53am UTC](https://discourse.julialang.org/t/repl-tab-completion/84000 "2022-07-10T07:53:52Z")

</div>

when typing a function name directly (without spaces) after an operator which is not a “standard operator” (e.g., +, -, \*, /, ^, =) auto completion does not work. This applies both to built-in operators (e.g., ÷, ⊻, ∈, …

---

## [OffsetArrays, inbounds, and confusion](https://discourse.julialang.org/t/offsetarrays-inbounds-and-confusion/81295)

<div class="topic-metadata">

**Author:** [@fft](https://discourse.julialang.org/u/fft)\
**Replies:** 53\
**Last updated:** [July 10, 2022, 7:27am UTC](https://discourse.julialang.org/t/offsetarrays-inbounds-and-confusion/81295 "2022-07-10T07:27:50Z")

</div>

There has been quite a bit of activity around the Yuri Vishnevsky article. Thought I would but some of my thoughts here as someone who is fairly new to Julia and heavily uses C++ and python professionally. As others hav…

---

## [Question on handling product of variables in BilevelJuMP](https://discourse.julialang.org/t/question-on-handling-product-of-variables-in-bileveljump/83375)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 3\
**Last updated:** [July 10, 2022, 12:47am UTC](https://discourse.julialang.org/t/question-on-handling-product-of-variables-in-bileveljump/83375 "2022-07-10T00:47:52Z")

</div>

I have a bilevel model where my inner-level problem has terms in constraints and objective that are the product of an upper-level and a lower-level variable. For example, using JuMP, BilevelJuMP, Gurobi model = Bilevel…

---

## [How to benchmark @distributed block?](https://discourse.julialang.org/t/how-to-benchmark-distributed-block/83973)

<div class="topic-metadata">

**Author:** [@v715](https://discourse.julialang.org/u/v715)\
**Replies:** 4\
**Last updated:** [July 9, 2022, 10:37pm UTC](https://discourse.julialang.org/t/how-to-benchmark-distributed-block/83973 "2022-07-09T22:37:23Z")

</div>

The following code works: using Distributed @time @distributed for i in 1:10000 i \* 2 end 0.008885 seconds (8.50 k allocations: 492.944 KiB, 99.20% compilation time) Task (done) @0x0000000109e9a6e0 But this cau…

---

## [Question about problem modifications in Gurobi](https://discourse.julialang.org/t/question-about-problem-modifications-in-gurobi/83963)

<div class="topic-metadata">

**Author:** [@guilhermebodin](https://discourse.julialang.org/u/guilhermebodin)\
**Replies:** 1\
**Last updated:** [July 9, 2022, 8:02pm UTC](https://discourse.julialang.org/t/question-about-problem-modifications-in-gurobi/83963 "2022-07-09T20:02:40Z")

</div>

There are two ways of changing the RHS of a constraint in Gurobi, one is to directly use MOI.set(model, MOI.ConstraintSet(), ci, new\_set) and the other one would be to make a MOI.modify(model, c, MOI.ScalarConstantChange…

---

## [Plot from DataFrames using StatsPlots](https://discourse.julialang.org/t/plot-from-dataframes-using-statsplots/83991)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 1\
**Last updated:** [July 9, 2022, 5:56pm UTC](https://discourse.julialang.org/t/plot-from-dataframes-using-statsplots/83991 "2022-07-09T17:56:53Z")

</div>

Hi all, I just learn about using csv and create dataframe. This is my code: using CSV using DataFrames df = CSV.read("/home/browni/LasthrimProjection/importedenergydata.csv", DataFrame) print(df) Now, I want to pl…

---

## [GLMakie.mesh - how to rotate view](https://discourse.julialang.org/t/glmakie-mesh-how-to-rotate-view/83993)

<div class="topic-metadata">

**Author:** [@trashspam7](https://discourse.julialang.org/u/trashspam7)\
**Replies:** 0\
**Last updated:** [July 9, 2022, 4:23pm UTC](https://discourse.julialang.org/t/glmakie-mesh-how-to-rotate-view/83993 "2022-07-09T16:23:19Z")

</div>

How do I rotate the view for GLMakie.mesh? Specifically, I want to have the x- and y-axes increasing going away from the camera, not towards. I saw in the documentation that there is an attribute model::Makie.Mat4f but …

---

## [Test of AMDGPU fails on 5900HX - hipErrorNoBinaryForGpu](https://discourse.julialang.org/t/test-of-amdgpu-fails-on-5900hx-hiperrornobinaryforgpu/83982)

<div class="topic-metadata">

**Author:** [@jdad](https://discourse.julialang.org/u/jdad)\
**Replies:** 2\
**Last updated:** [July 9, 2022, 4:05pm UTC](https://discourse.julialang.org/t/test-of-amdgpu-fails-on-5900hx-hiperrornobinaryforgpu/83982 "2022-07-09T16:05:59Z")

</div>

I have small server (Minisforum HX90) with Ryzen 5900HX/ Cezanne APU. I successfully installed AMDGPU julia\> AMDGPU.versioninfo() HSA Runtime (ready) - Path: /home/davidj/.julia/artifacts/b1aa837f69ba67b20f9654af56c818e…

---

## [Organizing structures in a package](https://discourse.julialang.org/t/organizing-structures-in-a-package/83979)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 2\
**Last updated:** [July 9, 2022, 3:47pm UTC](https://discourse.julialang.org/t/organizing-structures-in-a-package/83979 "2022-07-09T15:47:26Z")

</div>

If I’m developing a package where file1.jl contains a struct called struct1 and file2.jl has a struct called struct2 as well as a function that took those two structs as input, what would be the best way to organize this…

---

## [Alias a struct using it's own field](https://discourse.julialang.org/t/alias-a-struct-using-its-own-field/83990)

<div class="topic-metadata">

**Author:** [@moataz-sabry](https://discourse.julialang.org/u/moataz-sabry)\
**Replies:** 4\
**Last updated:** [July 9, 2022, 3:08pm UTC](https://discourse.julialang.org/t/alias-a-struct-using-its-own-field/83990 "2022-07-09T15:08:39Z")

</div>

let’s say I have the following struct: struct Dog name age end then I wanted to create an array of dogs like the following: array = \[Dog(:Jack, 2), Dog(:Max, 3)\] 2-element Vector{Dog}: Dog(:Jack, 2) Dog(:Ma…

---

## [The tooling barriers to writing+publishing a package](https://discourse.julialang.org/t/the-tooling-barriers-to-writing-publishing-a-package/83986)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 5\
**Last updated:** [July 9, 2022, 2:47pm UTC](https://discourse.julialang.org/t/the-tooling-barriers-to-writing-publishing-a-package/83986 "2022-07-09T14:47:36Z")

</div>

In the Julia community, we proudly say that the line between a developer and a user is thin. This is partially true: Julia packages mostly don’t have a two language problem, and \]dev makes it easy to start tinkering arou…

---

## [Announcing the new Julia Jobs category on Discourse](https://discourse.julialang.org/t/announcing-the-new-julia-jobs-category-on-discourse/83987)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [July 9, 2022, 1:40pm UTC](https://discourse.julialang.org/t/announcing-the-new-julia-jobs-category-on-discourse/83987 "2022-07-09T13:40:34Z")

</div>

Hey folks! We have long encouraged folks hiring people in the Julia ecosystem to post the jobs here on Discourse. However, with the number of jobs increasing along with the volume of the community section also increasin…

---

## [What is this error saying?](https://discourse.julialang.org/t/what-is-this-error-saying/83957)

<div class="topic-metadata">

**Author:** [@davidsonff](https://discourse.julialang.org/u/davidsonff)\
**Replies:** 8\
**Last updated:** [July 9, 2022, 11:48am UTC](https://discourse.julialang.org/t/what-is-this-error-saying/83957 "2022-07-09T11:48:37Z")

</div>

Hi, I’m trying to add Plots and I’m getting this error message: │ Install package? │ (@v1.7) pkg\> add Plots └ (y/n) \[y\]: y Resolving package versions… Downloaded artifact: libvorbis Downloaded artifact: libvorbi…

---

## [Makie error: scatter! not defined](https://discourse.julialang.org/t/makie-error-scatter-not-defined/83952)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 5\
**Last updated:** [July 9, 2022, 10:42am UTC](https://discourse.julialang.org/t/makie-error-scatter-not-defined/83952 "2022-07-09T10:42:35Z")

</div>

Can anyone help? I get an error of: LoadError: UndefVarError: scatter! not defined when I run this code: using Makie f(x,y) = cos(x)\*cos(y)\*sqrt(x^2 + y^2) x = range(-5, length = 100, stop = 5) y = range(-5, length …

---

## [Why is this function valid julia syntax?](https://discourse.julialang.org/t/why-is-this-function-valid-julia-syntax/83984)

<div class="topic-metadata">

**Author:** [@lukas.grunwald](https://discourse.julialang.org/u/lukas.grunwald)\
**Replies:** 1\
**Last updated:** [July 9, 2022, 9:44am UTC](https://discourse.julialang.org/t/why-is-this-function-valid-julia-syntax/83984 "2022-07-09T09:44:33Z")

</div>

The following function is valid julia code (in the sense that there is no parsing error) function temp(x::AbstractArray) x\[1\] = 1 + return nothing # This is the same as writing x\[1\] = 1 + return nothing end which …

---

## [Need some help/review on ants model](https://discourse.julialang.org/t/need-some-help-review-on-ants-model/83790)

<div class="topic-metadata">

**Author:** [@reyman](https://discourse.julialang.org/u/reyman)\
**Replies:** 4\
**Last updated:** [July 9, 2022, 9:14am UTC](https://discourse.julialang.org/t/need-some-help-review-on-ants-model/83790 "2022-07-09T09:14:29Z")

</div>

Hi there, Last year i start to replicate the famous “Ants” model using Agents.jl with version 4.x The result was not bad, see the video and original repo : This year, to finish integration of Julia with…

---

## [Empty vector loop](https://discourse.julialang.org/t/empty-vector-loop/83898)

<div class="topic-metadata">

**Author:** [@AS90](https://discourse.julialang.org/u/AS90)\
**Replies:** 15\
**Last updated:** [July 9, 2022, 7:31am UTC](https://discourse.julialang.org/t/empty-vector-loop/83898 "2022-07-09T07:31:16Z")

</div>

Hi. I’m looking to code the following pseudo-loop in Julia. x=\[\]; # empty vector for t in 0:2 x=\[x t\] end The answer should be x=\[0 1 2\]. The error I get is this. DimensionMismatch(“mismatch in dimension 1 (expected…

---

## [Question about XLSX?](https://discourse.julialang.org/t/question-about-xlsx/83931)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 5\
**Last updated:** [July 9, 2022, 7:10am UTC](https://discourse.julialang.org/t/question-about-xlsx/83931 "2022-07-09T07:10:25Z")

</div>

Dear all, What’s wrong with this error? julia\> XLSX.readtable("AREAER.xlsx", "Sheet1") ERROR: Shared Strings Table not found for this workbook. Stacktrace: \[1\] error(s::String) @ Base ./error.jl:33 \[2\] sst\_load…

---

## [MWE plot with slider](https://discourse.julialang.org/t/mwe-plot-with-slider/15876)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 7\
**Last updated:** [July 9, 2022, 6:50am UTC](https://discourse.julialang.org/t/mwe-plot-with-slider/15876 "2022-07-09T06:50:06Z")

</div>

Hi, I would like to find a MWE showing a slider which controls the plot behaviour, say, of a segment, like the coordinates of one of the two points. I looked at Makie, but could not find a simple example. Can someone …

---

## [Optimize a big model containing modules with different stiffness](https://discourse.julialang.org/t/optimize-a-big-model-containing-modules-with-different-stiffness/83530)

<div class="topic-metadata">

**Author:** [@Amarantine](https://discourse.julialang.org/u/Amarantine)\
**Replies:** 3\
**Last updated:** [July 9, 2022, 4:21am UTC](https://discourse.julialang.org/t/optimize-a-big-model-containing-modules-with-different-stiffness/83530 "2022-07-09T04:21:59Z")

</div>

Hello people! I have a few modules that I connected together as a big model. The modules have different stiffness. For example, module A is not stiff but runs very slowly for each time step (it has a delay component), bu…

---

## [Please delete](https://discourse.julialang.org/t/please-delete/83972)

<div class="topic-metadata">

**Author:** [@MysteriousStranger](https://discourse.julialang.org/u/MysteriousStranger)\
**Replies:** 1\
**Last updated:** [July 9, 2022, 2:18am UTC](https://discourse.julialang.org/t/please-delete/83972 "2022-07-09T02:18:45Z")

</div>

Please delete. … …!

---

## [Solve linear system repeatedly without allocation](https://discourse.julialang.org/t/solve-linear-system-repeatedly-without-allocation/83901)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 11\
**Last updated:** [July 9, 2022, 12:54am UTC](https://discourse.julialang.org/t/solve-linear-system-repeatedly-without-allocation/83901 "2022-07-09T00:54:47Z")

</div>

I have a B \\ A calculation I need to solve repeatedly (10^4–10^5 times) with the same B, ideally without allocation, that includes the result A is a mutable buffer I want to write to the elements of A may be ForwardDif…

---

## [Simplex heatmap](https://discourse.julialang.org/t/simplex-heatmap/83640)

<div class="topic-metadata">

**Author:** [@bryce](https://discourse.julialang.org/u/bryce)\
**Replies:** 15\
**Last updated:** [July 8, 2022, 11:51pm UTC](https://discourse.julialang.org/t/simplex-heatmap/83640 "2022-07-08T23:51:13Z")

</div>

I’m trying to generate a heatmap to visualize the output of a function evaluated on a grid of points over the unit 2-simplex. Here’s an example of the sort of data I’m working with: using Plots, Combinatorics, StatsBase…

---

## [Inconsistent documentation generation behaviors](https://discourse.julialang.org/t/inconsistent-documentation-generation-behaviors/83967)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 2\
**Last updated:** [July 8, 2022, 10:29pm UTC](https://discourse.julialang.org/t/inconsistent-documentation-generation-behaviors/83967 "2022-07-08T22:29:32Z")

</div>

The documentation for Documenter.jl describes how to write a docs/make.jl ile to generate documentation. julia-docdeploy/action.yml at master · julia-actions/julia-docdeploy · GitHub doesn’t use that file. When one bui…

---

## [Error in plotting](https://discourse.julialang.org/t/error-in-plotting/83968)

<div class="topic-metadata">

**Author:** [@JosieG](https://discourse.julialang.org/u/JosieG)\
**Replies:** 10\
**Last updated:** [July 8, 2022, 9:56pm UTC](https://discourse.julialang.org/t/error-in-plotting/83968 "2022-07-08T21:56:39Z")

</div>

I’m trying to plotting something. This is my code x = 1:20 y = m1\[1,:\] plot(x,y) Here y is a vector. And I want to plot the elements of this vector with x values = \[1:20\]. And I got the error MethodError: objects…

---

## [Best way to update parameter values in a temporary module](https://discourse.julialang.org/t/best-way-to-update-parameter-values-in-a-temporary-module/83971)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 4\
**Last updated:** [July 8, 2022, 9:37pm UTC](https://discourse.julialang.org/t/best-way-to-update-parameter-values-in-a-temporary-module/83971 "2022-07-08T21:37:08Z")

</div>

I am a Julia user mostly interested in numerical prototyping, where I have constant need to work with a large collection of custom functions that are related to each other, but far from being ready to define a package. I…

---

## [Performance optimization on lots of small linear algebra operations](https://discourse.julialang.org/t/performance-optimization-on-lots-of-small-linear-algebra-operations/83850)

<div class="topic-metadata">

**Author:** [@vfonov](https://discourse.julialang.org/u/vfonov)\
**Replies:** 13\
**Last updated:** [July 8, 2022, 9:11pm UTC](https://discourse.julialang.org/t/performance-optimization-on-lots-of-small-linear-algebra-operations/83850 "2022-07-08T21:11:31Z")

</div>

I stumble on a problem with execution speed when I run lots of simple linear algebra operations in a loop, where using general Arrays performs faster then StaticArrays, but still not as fast as a pure C implementation. …

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

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