# Latest

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

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

**Page:** 1098

---

## [Is there a function for batch mean and std](https://discourse.julialang.org/t/is-there-a-function-for-batch-mean-and-std/77849)

<div class="topic-metadata">

**Author:** [@GHTaarn](https://discourse.julialang.org/u/GHTaarn)\
**Replies:** 2\
**Last updated:** [March 14, 2022, 10:10am UTC](https://discourse.julialang.org/t/is-there-a-function-for-batch-mean-and-std/77849 "2022-03-14T10:10:08Z")

</div>

Hi, Is there a package that has a function doing something similar to Batch updates for simple statistics In other words, I want to calculate std(vcat(a,b)) and know mean(a), mean(b), std(a), std(b), length(a), length(…

---

## [How to use CUDA in Github CI?](https://discourse.julialang.org/t/how-to-use-cuda-in-github-ci/77855)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 2\
**Last updated:** [March 14, 2022, 10:05am UTC](https://discourse.julialang.org/t/how-to-use-cuda-in-github-ci/77855 "2022-03-14T10:05:37Z")

</div>

Hello, I contributed some code to a package, and I made unit tests to check whether the code works on the GPU. I wrapped the code in a if CUDA.functional() ... end block and I see this: It seems like CUDA is not fun…

---

## [Using splat inside macro](https://discourse.julialang.org/t/using-splat-inside-macro/77761)

<div class="topic-metadata">

**Author:** [@pjgorski](https://discourse.julialang.org/u/pjgorski)\
**Replies:** 3\
**Last updated:** [March 14, 2022, 9:33am UTC](https://discourse.julialang.org/t/using-splat-inside-macro/77761 "2022-03-14T09:33:44Z")

</div>

I wanted to create a macro to print simulation status every now and then. function display\_res(ntuple::NamedTuple) cur = Dates.format(now(), "HH:MM:SS dd.mm.yyyy"); str = savename(ntuple, connector="; ", sort = …

---

## [Can a function return another function?](https://discourse.julialang.org/t/can-a-function-return-another-function/77806)

<div class="topic-metadata">

**Author:** [@marllos](https://discourse.julialang.org/u/marllos)\
**Replies:** 13\
**Last updated:** [March 14, 2022, 9:19am UTC](https://discourse.julialang.org/t/can-a-function-return-another-function/77806 "2022-03-14T09:19:50Z")

</div>

Hello everyone! Can a function return another function?

---

## [How to use the solver-dependent callback](https://discourse.julialang.org/t/how-to-use-the-solver-dependent-callback/76519)

<div class="topic-metadata">

**Author:** [@Jacob\_Jin](https://discourse.julialang.org/u/Jacob_Jin)\
**Replies:** 12\
**Last updated:** [March 14, 2022, 7:48am UTC](https://discourse.julialang.org/t/how-to-use-the-solver-dependent-callback/76519 "2022-03-14T07:48:26Z")

</div>

I want to use Gurobi to implement Bender’s decomposition. I write it in Python: LB = model.cbGet(GRB.Callback.MIPSOL\_OBJBND) How to call the cbGet(GRB.Callback.MIPSOL\_OBJBND) in Julia? Thank you so much.

---

## [For T in (Float64,) vs let T=Float64](https://discourse.julialang.org/t/for-t-in-float64-vs-let-t-float64/77842)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 3\
**Last updated:** [March 14, 2022, 6:26am UTC](https://discourse.julialang.org/t/for-t-in-float64-vs-let-t-float64/77842 "2022-03-14T06:26:23Z")

</div>

I wonder why the first one in the following fails for T in (Float64,) sizefloat(x::T) = sizeof(T) println(methods(sizefloat)) println(sizefloat(3.4)) end ERROR: UndefVarError: T not defined Stacktrace: \[1\]…

---

## [Optimization with Gurobi](https://discourse.julialang.org/t/optimization-with-gurobi/77125)

<div class="topic-metadata">

**Author:** [@O\_olalekan](https://discourse.julialang.org/u/O_olalekan)\
**Replies:** 4\
**Last updated:** [March 14, 2022, 1:35am UTC](https://discourse.julialang.org/t/optimization-with-gurobi/77125 "2022-03-14T01:35:36Z")

</div>

I am solving an optimization problem with Gurobi package. I set the non-convex parameter to be 2 which helped me with the bilinear constraints. But, I am getting an infeasible solution with a warning “”" Model contains…

---

## [Cultural act for the community](https://discourse.julialang.org/t/cultural-act-for-the-community/77835)

<div class="topic-metadata">

**Author:** [@jj-404](https://discourse.julialang.org/u/jj-404)\
**Replies:** 2\
**Last updated:** [March 13, 2022, 11:46pm UTC](https://discourse.julialang.org/t/cultural-act-for-the-community/77835 "2022-03-13T23:46:09Z")

</div>

Hi everyone, Can I know the reason why julia is not part of this? Feel betrayed by the community, can devs do something? https://github.com/cat-milk/Anime-Girls-Holding-Programming-Books

---

## [Data Interpolation on a spherical or geographic coordinate system](https://discourse.julialang.org/t/data-interpolation-on-a-spherical-or-geographic-coordinate-system/77833)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 1\
**Last updated:** [March 13, 2022, 11:18pm UTC](https://discourse.julialang.org/t/data-interpolation-on-a-spherical-or-geographic-coordinate-system/77833 "2022-03-13T23:18:36Z")

</div>

I am just starting a new project where I want to use the Agents.jl package to create an agent based model. The nice thing about Agents.jl is that it supports geographic meshes or grids, like the WGS84 projection, which i…

---

## [Rant: I hate that it's possible to iterate over an integer](https://discourse.julialang.org/t/rant-i-hate-that-its-possible-to-iterate-over-an-integer/77645)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 41\
**Last updated:** [March 13, 2022, 10:22pm UTC](https://discourse.julialang.org/t/rant-i-hate-that-its-possible-to-iterate-over-an-integer/77645 "2022-03-13T22:22:46Z")

</div>

Maybe this’ll be helpful to new users like myself. I’ve been writing Julia every day for about a year now. (and still considering myself new because I still haven’t had the time to learn the type system properly, for exa…

---

## [\[ANN\] Juliaup Preview - Julia version manager and Windows Store installer](https://discourse.julialang.org/t/ann-juliaup-preview-julia-version-manager-and-windows-store-installer/61920)

<div class="topic-metadata">

**Author:** [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Replies:** 94\
**Last updated:** [March 13, 2022, 9:29pm UTC](https://discourse.julialang.org/t/ann-juliaup-preview-julia-version-manager-and-windows-store-installer/61920 "2022-03-13T21:29:07Z")

</div>

I am looking for some brave Windows users that are willing to test drive a new installer for Julia on Windows that is called Juliaup. Juliaup is a new Julia version manager for Windows that is distributed via the Window…

---

## [Help reducing compilation time](https://discourse.julialang.org/t/help-reducing-compilation-time/77823)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 8\
**Last updated:** [March 13, 2022, 8:58pm UTC](https://discourse.julialang.org/t/help-reducing-compilation-time/77823 "2022-03-13T20:58:53Z")

</div>

Hi! I have the following function: function textview( lines::Vector{T}, view::NTuple{4, Int}; active\_highlight::String = \_CSI \* "30;43m", active\_match::Int = 0, frozen\_columns\_at\_beginning::Int = 0,…

---

## [Julia app as package?](https://discourse.julialang.org/t/julia-app-as-package/77831)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [March 13, 2022, 8:37pm UTC](https://discourse.julialang.org/t/julia-app-as-package/77831 "2022-03-13T20:37:02Z")

</div>

I have a Julia application (https://github.com/ufechner7/KiteViewer) which I might want to convert into a Julia package. Main reasons: easier to install, no git needed easier to use continues integration because for p…

---

## [New Distribution Stack Overflow](https://discourse.julialang.org/t/new-distribution-stack-overflow/77128)

<div class="topic-metadata">

**Author:** [@enweg](https://discourse.julialang.org/u/enweg)\
**Replies:** 3\
**Last updated:** [March 13, 2022, 6:48pm UTC](https://discourse.julialang.org/t/new-distribution-stack-overflow/77128 "2022-03-13T18:48:40Z")

</div>

I am currently trying to implement a distribution using the Distributions.jl interface. However, when following the guidelines mentioned here for multivariate distributions (Create New Samplers and Distributions · Distri…

---

## [AMD Rome vs Intel Xeon shows bad scaling with threads for AMD](https://discourse.julialang.org/t/amd-rome-vs-intel-xeon-shows-bad-scaling-with-threads-for-amd/77683)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 20\
**Last updated:** [March 13, 2022, 6:53pm UTC](https://discourse.julialang.org/t/amd-rome-vs-intel-xeon-shows-bad-scaling-with-threads-for-amd/77683 "2022-03-13T18:53:17Z")

</div>

I ran my 3D finite difference stencil benchmark https://github.com/Chiil/MicroHH.jl/blob/main/test/dynamics\_kernel.jl on AMD Rome 7H12 and Intel Xeon Platinum 8360Y with grid spacing (itot = 256; jtot = 256; ktot = 1024)…

---

## [\[Ann\]\[Tutorial\] How-to develop a Julia package from scratch](https://discourse.julialang.org/t/ann-tutorial-how-to-develop-a-julia-package-from-scratch/52227)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 19\
**Last updated:** [March 13, 2022, 6:24pm UTC](https://discourse.julialang.org/t/ann-tutorial-how-to-develop-a-julia-package-from-scratch/52227 "2022-03-13T18:24:22Z")

</div>

As part of my efforts to update the Julia Concise Tutorial, I completely rewritten the chapter dedicated to “How to develop a Julia Package”. Yes, sure we have the “Creating Packages” section in the documentation… but t…

---

## [Execution of notebook in Literate.jl not working but notebook executes fine in Jupyter: serialization issue](https://discourse.julialang.org/t/execution-of-notebook-in-literate-jl-not-working-but-notebook-executes-fine-in-jupyter-serialization-issue/76387)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 5\
**Last updated:** [March 13, 2022, 5:56pm UTC](https://discourse.julialang.org/t/execution-of-notebook-in-literate-jl-not-working-but-notebook-executes-fine-in-jupyter-serialization-issue/76387 "2022-03-13T17:56:59Z")

</div>

I have a julia script that executes fine and I can generate a Jupyter notebook with Literate.jl fine, if I use execute=false. If I open the generated notebook in Juptyer it executes fine. But if I specify execute=true in…

---

## [WARNING: using XXX.xxx in module Main conflicts with an existing identifier](https://discourse.julialang.org/t/warning-using-xxx-xxx-in-module-main-conflicts-with-an-existing-identifier/77825)

<div class="topic-metadata">

**Author:** [@yashi](https://discourse.julialang.org/u/yashi)\
**Replies:** 1\
**Last updated:** [March 13, 2022, 5:51pm UTC](https://discourse.julialang.org/t/warning-using-xxx-xxx-in-module-main-conflicts-with-an-existing-identifier/77825 "2022-03-13T17:51:24Z")

</div>

(I’m using Makie as an example but I think my question is how Julia handle Modules and export.) When I run the following code in a REPL session, I get WARNING: using GeometryBasics.Mesh in module Main conflicts with a…

---

## [Would a function istypestable(foo, x) make sense for beginners?](https://discourse.julialang.org/t/would-a-function-istypestable-foo-x-make-sense-for-beginners/76696)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 6\
**Last updated:** [March 13, 2022, 4:06pm UTC](https://discourse.julialang.org/t/would-a-function-istypestable-foo-x-make-sense-for-beginners/76696 "2022-03-13T16:06:26Z")

</div>

Given the importance for performances of type stability, I wonder if the @code\_warntype macro, where the type stability is somehow hidden in the type of Body: is the easiest pick for newcomers or if instead a simpler ist…

---

## [A Singularity Event for Scientific Computing](https://discourse.julialang.org/t/a-singularity-event-for-scientific-computing/77800)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 3\
**Last updated:** [March 13, 2022, 2:43pm UTC](https://discourse.julialang.org/t/a-singularity-event-for-scientific-computing/77800 "2022-03-13T14:43:20Z")

</div>

On scientific computing going ‘stale’ and needing a singularity event. Julia is what can inject new life here… Could we invite John Etgen to JuliaCon?

---

## [Weights and indices for linear interpolation/extrapolation](https://discourse.julialang.org/t/weights-and-indices-for-linear-interpolation-extrapolation/77580)

<div class="topic-metadata">

**Author:** [@fredrikpaues](https://discourse.julialang.org/u/fredrikpaues)\
**Replies:** 15\
**Last updated:** [March 12, 2022, 7:29pm UTC](https://discourse.julialang.org/t/weights-and-indices-for-linear-interpolation-extrapolation/77580 "2022-03-12T19:29:10Z")

</div>

A performance-critical function of a bigger program that I’m writing consists of locating points on a grid. It amounts to finding the indices and weights needed for a linear interpolation/extrapolation—without doing the …

---

## [How to plot on a square grid with specific colours?](https://discourse.julialang.org/t/how-to-plot-on-a-square-grid-with-specific-colours/77801)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [March 13, 2022, 6:41am UTC](https://discourse.julialang.org/t/how-to-plot-on-a-square-grid-with-specific-colours/77801 "2022-03-13T06:41:29Z")

</div>

I am trying to plot on a 2D grid the presence of “agents” (integers) on a certain plot, but I can"t get: how to associate a specific colour to a certain cell integer how to force the plot to be squared Here it is what…

---

## [Functions mimic pandas apply(list)](https://discourse.julialang.org/t/functions-mimic-pandas-apply-list/77813)

<div class="topic-metadata">

**Author:** [@Frankiewaang](https://discourse.julialang.org/u/Frankiewaang)\
**Replies:** 1\
**Last updated:** [March 13, 2022, 6:18am UTC](https://discourse.julialang.org/t/functions-mimic-pandas-apply-list/77813 "2022-03-13T06:18:42Z")

</div>

Hi Guys, I wanna ask about the expression that could mimic python’s df.groupby("a").apply(list) And here is what the function do: ds = DataFrame(a=repeat(\[1,2\],inner=2),b='a':'j') and result should be a b 1 \[…

---

## [Referencing the same module from multiple files](https://discourse.julialang.org/t/referencing-the-same-module-from-multiple-files/77775)

<div class="topic-metadata">

**Author:** [@knttnk](https://discourse.julialang.org/u/knttnk)\
**Replies:** 2\
**Last updated:** [March 13, 2022, 2:49am UTC](https://discourse.julialang.org/t/referencing-the-same-module-from-multiple-files/77775 "2022-03-13T02:49:43Z")

</div>

Reproducible code I created 3 files like # useful.jl module Useful # issue struct UsefulStruct data end end # create.jl module Create include("useful.jl") function create()::Useful.UsefulStruct Useful.Useful…

---

## [Convex hull and its edges](https://discourse.julialang.org/t/convex-hull-and-its-edges/77787)

<div class="topic-metadata">

**Author:** [@stla](https://discourse.julialang.org/u/stla)\
**Replies:** 2\
**Last updated:** [March 13, 2022, 12:50am UTC](https://discourse.julialang.org/t/convex-hull-and-its-edges/77787 "2022-03-13T00:50:07Z")

</div>

Hello, My R package cxhull is based on the C library Qhull. Not only it can compute the vertices of a convex hull, it also returns the edges of the convex hull, and more. I need the edges of the convex hull of a set of…

---

## [Set MathOptInterface.SecondOrderCone is not accepted when solution method is BilevelJuMP.SOS1Mode{Float64}](https://discourse.julialang.org/t/set-mathoptinterface-secondordercone-is-not-accepted-when-solution-method-is-bileveljump-sos1mode-float64/77737)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 3\
**Last updated:** [March 13, 2022, 12:45am UTC](https://discourse.julialang.org/t/set-mathoptinterface-secondordercone-is-not-accepted-when-solution-method-is-bileveljump-sos1mode-float64/77737 "2022-03-13T00:45:12Z")

</div>

Here is an example: using JuMP, BilevelJuMP, Gurobi model=BilevelModel(Gurobi.Optimizer) set\_optimizer\_attribute(model,"NonConvex",2) @variable(Lower(model), x) @variable(Upper(model), y) @objective(Upper(model), Min, …

---

## [Question regarding "WARNING: ignoring conflicting import"](https://discourse.julialang.org/t/question-regarding-warning-ignoring-conflicting-import/77579)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 3\
**Last updated:** [March 13, 2022, 12:41am UTC](https://discourse.julialang.org/t/question-regarding-warning-ignoring-conflicting-import/77579 "2022-03-13T00:41:00Z")

</div>

No matter how many times I run the following, I get no warning or error: using CSV: getrow However, I get warning when I do this more than once: module Test function func() println("func") end end using .Test: …

---

## [Defining parametric unions with no parametric members](https://discourse.julialang.org/t/defining-parametric-unions-with-no-parametric-members/77786)

<div class="topic-metadata">

**Author:** [@pgoulart](https://discourse.julialang.org/u/pgoulart)\
**Replies:** 6\
**Last updated:** [March 13, 2022, 12:09am UTC](https://discourse.julialang.org/t/defining-parametric-unions-with-no-parametric-members/77786 "2022-03-13T00:09:24Z")

</div>

I am trying to understand the syntax and requirements for defining parametric union types. It seems that defining a parametric union doesn’t work unless at least one of its components is also parametric. Example: F…

---

## [Struct of Arrays (SoA) vs Array of Structs (AoS)](https://discourse.julialang.org/t/struct-of-arrays-soa-vs-array-of-structs-aos/30015)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 30\
**Last updated:** [March 12, 2022, 10:47pm UTC](https://discourse.julialang.org/t/struct-of-arrays-soa-vs-array-of-structs-aos/30015 "2022-03-12T22:47:43Z")

</div>

There are two ways to arrange data in memory. SoA means Struct of Arrays and AoS means Array of Structs. I’m trying to understand when one is better than the other in Julia. I was reading @ChrisRackauckas fantastic lect…

---

## [Possible threading bug on M1 Max (only ARM build)](https://discourse.julialang.org/t/possible-threading-bug-on-m1-max-only-arm-build/77779)

<div class="topic-metadata">

**Author:** [@robertfeldt](https://discourse.julialang.org/u/robertfeldt)\
**Replies:** 19\
**Last updated:** [March 12, 2022, 10:01pm UTC](https://discourse.julialang.org/t/possible-threading-bug-on-m1-max-only-arm-build/77779 "2022-03-12T22:01:01Z")

</div>

Got a new MacBook Pro 16" M1 Max with 64GB mem and installed both the 1.7.2 ARM build and the 1.6.5 macOS (so non-ARM) build. The simple Threads.@threads example from the doc pages behaves as expected on the non-arm buil…

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

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