# Latest

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

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

**Page:** 1002

---

## [Issue when calling the ?gemm\_batch function from MKL](https://discourse.julialang.org/t/issue-when-calling-the-gemm-batch-function-from-mkl/83232)

<div class="topic-metadata">

**Author:** [@EduMolinero](https://discourse.julialang.org/u/EduMolinero)\
**Replies:** 0\
**Last updated:** [June 23, 2022, 11:03am UTC](https://discourse.julialang.org/t/issue-when-calling-the-gemm-batch-function-from-mkl/83232 "2022-06-23T11:03:57Z")

</div>

Hi! I’m trying to implement the ?gemm\_batch functions from the Intel MKL library into Julia. These functions performs matrix-matrix operations with groups of matrices, processing a number of groups at once. Just for te…

---

## [Turing and DifferentialEquations: TypeError expected Float64, got ForwardDiff](https://discourse.julialang.org/t/turing-and-differentialequations-typeerror-expected-float64-got-forwarddiff/82194)

<div class="topic-metadata">

**Author:** [@finn](https://discourse.julialang.org/u/finn)\
**Replies:** 4\
**Last updated:** [June 23, 2022, 9:31am UTC](https://discourse.julialang.org/t/turing-and-differentialequations-typeerror-expected-float64-got-forwarddiff/82194 "2022-06-23T09:31:41Z")

</div>

Hi all, I am trying to use DifferentialEquations.jl and Turing.jl to perform parameter estimation using MCMC. I am currently getting the error TypeError: in typeassert, expected Float64, got a value of type ForwardDi…

---

## [Immutable struct with an Array slower than a constant global Array](https://discourse.julialang.org/t/immutable-struct-with-an-array-slower-than-a-constant-global-array/83145)

<div class="topic-metadata">

**Author:** [@bchaber](https://discourse.julialang.org/u/bchaber)\
**Replies:** 14\
**Last updated:** [June 23, 2022, 8:26am UTC](https://discourse.julialang.org/t/immutable-struct-with-an-array-slower-than-a-constant-global-array/83145 "2022-06-23T08:26:24Z")

</div>

Hello, I’m trying to write a Lattice Boltzmann Solver in Julia. My initial version strongly relies on global constants (mostly numeric values and Arrays). I’ve tried to use immutable structures that hold the state of my…

---

## [Segmentation fault when loading a Flux model with RFFT Plan](https://discourse.julialang.org/t/segmentation-fault-when-loading-a-flux-model-with-rfft-plan/83227)

<div class="topic-metadata">

**Author:** [@LukasHasf](https://discourse.julialang.org/u/LukasHasf)\
**Replies:** 0\
**Last updated:** [June 23, 2022, 8:25am UTC](https://discourse.julialang.org/t/segmentation-fault-when-loading-a-flux-model-with-rfft-plan/83227 "2022-06-23T08:25:57Z")

</div>

Hello, I’m pretty new to Julia, so this problem could be caused by my inexperience. I’m trying to train a Flux model that needs to do a Fourier transform. For performance reasons, I wanted the transform to be precomput…

---

## [Dmd for 1D heat equation](https://discourse.julialang.org/t/dmd-for-1d-heat-equation/83159)

<div class="topic-metadata">

**Author:** [@totti94](https://discourse.julialang.org/u/totti94)\
**Replies:** 3\
**Last updated:** [June 23, 2022, 7:05am UTC](https://discourse.julialang.org/t/dmd-for-1d-heat-equation/83159 "2022-06-23T07:05:17Z")

</div>

Hello everybody. I am working on a heat equation of 1D heat equation and I was applying the DMD method on the numeric solution using DMDSVD() which gave me the following error DimensionMismatch("expected axes . I have …

---

## [Change column to row using conditions](https://discourse.julialang.org/t/change-column-to-row-using-conditions/83175)

<div class="topic-metadata">

**Author:** [@sai\_matcha](https://discourse.julialang.org/u/sai_matcha)\
**Replies:** 4\
**Last updated:** [June 23, 2022, 6:58am UTC](https://discourse.julialang.org/t/change-column-to-row-using-conditions/83175 "2022-06-23T06:58:44Z")

</div>

Hi, i have a dataframe like this df = DataFrame() df.id = sort!(repeat(1:3,5)) df.time = repeat(1:5,3) df.dv1 = repeat(\['.',".",".",".",1\],3) df.dv2 = repeat(\['.',".",".",".",10\],3) df.cmt = repeat(\[1,1,1,1,2\],3) i j…

---

## [Inference bug when using nested generators?](https://discourse.julialang.org/t/inference-bug-when-using-nested-generators/82991)

<div class="topic-metadata">

**Author:** [@jonathan-laurent](https://discourse.julialang.org/u/jonathan-laurent)\
**Replies:** 21\
**Last updated:** [June 23, 2022, 6:44am UTC](https://discourse.julialang.org/t/inference-bug-when-using-nested-generators/82991 "2022-06-23T06:44:02Z")

</div>

The following code does not infer: f(n) = (i^2 for i in 1:n) g(n) = sum(x^2 for x in f(n)) @code\_warntype g(3) Output: MethodInstance for g(::Int64) from g(n) in Main at /home/jonathan/AlphaZero.jl/redesign/private/…

---

## [How to write conditional expression using JuMP](https://discourse.julialang.org/t/how-to-write-conditional-expression-using-jump/83106)

<div class="topic-metadata">

**Author:** [@chenr86](https://discourse.julialang.org/u/chenr86)\
**Replies:** 17\
**Last updated:** [June 23, 2022, 6:42am UTC](https://discourse.julialang.org/t/how-to-write-conditional-expression-using-jump/83106 "2022-06-23T06:42:26Z")

</div>

Hello, I am using JuMP to solve dynamic programming problem. My constraints are flow and level, which are piecewise and depend on each other. level\[r, i\] = f(flow\[r, i\], level\[r, i-1\]) , flow\[r, i\] = f(level\[r, i\], n). …

---

## [FastAPI alternative in Julia](https://discourse.julialang.org/t/fastapi-alternative-in-julia/26645)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 7\
**Last updated:** [June 23, 2022, 5:29am UTC](https://discourse.julialang.org/t/fastapi-alternative-in-julia/26645 "2022-06-23T05:29:34Z")

</div>

I recently came across https://fastapi.tiangolo.com which looks really cool. I was wondering if there is a similar project in Julia with similar ambitions? I’m aware of Genie and Mux et. al. which are quite nice and do t…

---

## [GPU Array indexing failed when using Transformers.Basic](https://discourse.julialang.org/t/gpu-array-indexing-failed-when-using-transformers-basic/83222)

<div class="topic-metadata">

**Author:** [@Molox](https://discourse.julialang.org/u/Molox)\
**Replies:** 0\
**Last updated:** [June 23, 2022, 4:51am UTC](https://discourse.julialang.org/t/gpu-array-indexing-failed-when-using-transformers-basic/83222 "2022-06-23T04:51:07Z")

</div>

I was doing indexing on a GPU array using GPU index, and everything works fine, but once I import Transformers package and run it again, it gives me an error. using CUDA x = CuArray(1:3) list = CuArray(1:10) list\[ x …

---

## [Gaussian Process Optimization JuMP.jl](https://discourse.julialang.org/t/gaussian-process-optimization-jump-jl/83217)

<div class="topic-metadata">

**Author:** [@j0sh](https://discourse.julialang.org/u/j0sh)\
**Replies:** 4\
**Last updated:** [June 23, 2022, 4:09am UTC](https://discourse.julialang.org/t/gaussian-process-optimization-jump-jl/83217 "2022-06-23T04:09:55Z")

</div>

My goal is to design a trajectory (x,y coordinates) that minimizes the variance of a Gaussian Process at a specified set of query points. The objective function is the trace of the covariance matrix from the Gaussian Pro…

---

## [Can PackageCompiler.jl compile just parts of packages?](https://discourse.julialang.org/t/can-packagecompiler-jl-compile-just-parts-of-packages/64000)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 7\
**Last updated:** [June 23, 2022, 3:07am UTC](https://discourse.julialang.org/t/can-packagecompiler-jl-compile-just-parts-of-packages/64000 "2022-06-23T03:07:36Z")

</div>

I’m developing a package, and it takes quite a while to compile (~30s), which is long enough to be annoying when trying to test/bugfix/retest. PackageCompiler.jl is awesome and can get rid of the compilation overhead (by…

---

## [Mac/cross-platform screen capture](https://discourse.julialang.org/t/mac-cross-platform-screen-capture/83214)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 2\
**Last updated:** [June 23, 2022, 2:45am UTC](https://discourse.julialang.org/t/mac-cross-platform-screen-capture/83214 "2022-06-23T02:45:28Z")

</div>

For Windows, we have the beautiful ImageMagick.load("screenshot:") For Linux, we have another less elegant solution with ImageMagick For Mac or cross-platform, how can we take a screenshot programmatically? Ideally a J…

---

## [Seeking English-to-Spanish Volunteer Translator for 2022 Julia User & Developer Survey](https://discourse.julialang.org/t/seeking-english-to-spanish-volunteer-translator-for-2022-julia-user-developer-survey/82384)

<div class="topic-metadata">

**Author:** [@ahclaster](https://discourse.julialang.org/u/ahclaster)\
**Replies:** 6\
**Last updated:** [June 23, 2022, 1:52am UTC](https://discourse.julialang.org/t/seeking-english-to-spanish-volunteer-translator-for-2022-julia-user-developer-survey/82384 "2022-06-23T01:52:36Z")

</div>

We are looking for a volunteer translator to translate the 2022 Julia User & Developer Survey from English into Spanish. We can provide a copy of last year’s survey in English and Spanish - most of the content is the sa…

---

## [Code organization for running on a cluster](https://discourse.julialang.org/t/code-organization-for-running-on-a-cluster/83215)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 0\
**Last updated:** [June 23, 2022, 12:37am UTC](https://discourse.julialang.org/t/code-organization-for-running-on-a-cluster/83215 "2022-06-23T00:37:51Z")

</div>

I’d like to get some input on how to organize my code to run on a computer cluster. I have programmed the computation I want to perform on a file main.jl. The contents of main.jl would be something like this: #! main.jl…

---

## [2d finite differences implementation for a Numerical Analysis lecture](https://discourse.julialang.org/t/2d-finite-differences-implementation-for-a-numerical-analysis-lecture/70222)

<div class="topic-metadata">

**Author:** [@vicdolean](https://discourse.julialang.org/u/vicdolean)\
**Replies:** 4\
**Last updated:** [June 23, 2022, 12:22am UTC](https://discourse.julialang.org/t/2d-finite-differences-implementation-for-a-numerical-analysis-lecture/70222 "2022-06-23T00:22:31Z")

</div>

Hi! I’m new to Julia world and would need some help in the transition from Matlab. I am teaching a numerical analysis class where I use finite differences on a two dimensional (cartesian but not necessarily square) doma…

---

## [Radial Basis Finite Difference](https://discourse.julialang.org/t/radial-basis-finite-difference/66379)

<div class="topic-metadata">

**Author:** [@Manisha\_07](https://discourse.julialang.org/u/Manisha_07)\
**Replies:** 2\
**Last updated:** [June 22, 2022, 11:21pm UTC](https://discourse.julialang.org/t/radial-basis-finite-difference/66379 "2022-06-22T23:21:34Z")

</div>

Hello People I was trying to simulate heat equation using Julia by the method of finite difference. I would like to simulate for Radial Basis Finite Difference method also. Please help me to find the code for it my c…

---

## [Iterator powers?](https://discourse.julialang.org/t/iterator-powers/83060)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 5\
**Last updated:** [June 22, 2022, 11:17pm UTC](https://discourse.julialang.org/t/iterator-powers/83060 "2022-06-22T23:17:52Z")

</div>

How to get something like (0:7)^4, but for a custom iterator, and for an arbitrary positive integer exponent? The result should be similar to Iterators.product(0:7, 0:7, 0:7, 0:7), but type stable.

---

## [Give feedback on a package for visualizing univariate distributions before I register it](https://discourse.julialang.org/t/give-feedback-on-a-package-for-visualizing-univariate-distributions-before-i-register-it/83209)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 0\
**Last updated:** [June 22, 2022, 10:07pm UTC](https://discourse.julialang.org/t/give-feedback-on-a-package-for-visualizing-univariate-distributions-before-i-register-it/83209 "2022-06-22T22:07:37Z")

</div>

I wanted a quick and foolproof way for visualizing univariate distributions using all three of histogram, KDE, ECDF on the same plot. The package is here: Neven Sajko / UnivariateProbabilityDistributionVisualizationCalc…

---

## [Create a new column that has a list of items of a second column, with a condition from a third column](https://discourse.julialang.org/t/create-a-new-column-that-has-a-list-of-items-of-a-second-column-with-a-condition-from-a-third-column/83206)

<div class="topic-metadata">

**Author:** [@Juan\_Mac\_Donagh](https://discourse.julialang.org/u/Juan_Mac_Donagh)\
**Replies:** 1\
**Last updated:** [June 22, 2022, 9:54pm UTC](https://discourse.julialang.org/t/create-a-new-column-that-has-a-list-of-items-of-a-second-column-with-a-condition-from-a-third-column/83206 "2022-06-22T21:54:11Z")

</div>

Hi, I have a simple problem: I have a DataFrame that looks like this: df = DataFrame() df.sum = \[\[200,0,1,1,0\], \[0,0,0\], \[0,1,1,1,1,0,0\]\] df.score= \[\[1,2,22,25,5\], \[1,1,2\], \[1,24,54,89,12,1,2\]\] df.id = \["1", "2", "3"\] …

---

## [\[ANN\] ParameterizedNotebooks.jl](https://discourse.julialang.org/t/ann-parameterizednotebooks-jl/83207)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 0\
**Last updated:** [June 22, 2022, 9:44pm UTC](https://discourse.julialang.org/t/ann-parameterizednotebooks-jl/83207 "2022-06-22T21:44:29Z")

</div>

Minor announcement of a package I recently updated which could be of general use: GitHub - marius311/ParameterizedNotebooks.jl: Parameterize Jupyter notebooks in Julia Its a tool that lets you parameterize Jupyter noteb…

---

## [Cannot register function because it does not support differentiation although it does](https://discourse.julialang.org/t/cannot-register-function-because-it-does-not-support-differentiation-although-it-does/83167)

<div class="topic-metadata">

**Author:** [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Replies:** 4\
**Last updated:** [June 22, 2022, 9:14pm UTC](https://discourse.julialang.org/t/cannot-register-function-because-it-does-not-support-differentiation-although-it-does/83167 "2022-06-22T21:14:41Z")

</div>

I want to perform some nonlinear optimization using Ipopt through JuMP. I have some user-defined function p\_nomr\_ln\_Sum (see below) that I want to use throughout the optimization. I keep getting the error ERROR: LoadErr…

---

## [Edit: Just a typo - ignore. How to specify GLMakie to display window in full screen mode?](https://discourse.julialang.org/t/edit-just-a-typo-ignore-how-to-specify-glmakie-to-display-window-in-full-screen-mode/83203)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 3\
**Last updated:** [June 22, 2022, 8:44pm UTC](https://discourse.julialang.org/t/edit-just-a-typo-ignore-how-to-specify-glmakie-to-display-window-in-full-screen-mode/83203 "2022-06-22T20:44:22Z")

</div>

Hello, I would like to specify GLMakie to display the window in full screen mode. A search of Makie Issues gave the following accepted solution: However, when I implement this proposed solution in a MWE as below th…

---

## [How to define a function that accepts a vector when all elements are \<: S even if the vector is defined as Vector{T} with S \<: T](https://discourse.julialang.org/t/how-to-define-a-function-that-accepts-a-vector-when-all-elements-are-s-even-if-the-vector-is-defined-as-vector-t-with-s-t/83182)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [June 22, 2022, 8:24pm UTC](https://discourse.julialang.org/t/how-to-define-a-function-that-accepts-a-vector-when-all-elements-are-s-even-if-the-vector-is-defined-as-vector-t-with-s-t/83182 "2022-06-22T20:24:21Z")

</div>

I have a situation where I want to remain general on the type of a specific container (AbstractAbstractFoo), as in the future I may develop other types (say AbstractFoo2 in the example below), but I have a concrete appli…

---

## [Error caused by Sending Vector{Int64} to Vector{Integer} type function](https://discourse.julialang.org/t/error-caused-by-sending-vector-int64-to-vector-integer-type-function/83194)

<div class="topic-metadata">

**Author:** [@Jack\_N](https://discourse.julialang.org/u/Jack_N)\
**Replies:** 2\
**Last updated:** [June 22, 2022, 7:17pm UTC](https://discourse.julialang.org/t/error-caused-by-sending-vector-int64-to-vector-integer-type-function/83194 "2022-06-22T19:17:33Z")

</div>

I know that if I had some function function a(b::Integer) then I can call a using parameters of any sub-type of Integer, so Int64 or Int32, for example. I am wondering if there is any way to do the same thing with vec…

---

## [Raytracing weekend: debugging unexpected allocations](https://discourse.julialang.org/t/raytracing-weekend-debugging-unexpected-allocations/83196)

<div class="topic-metadata">

**Author:** [@mikegedelman](https://discourse.julialang.org/u/mikegedelman)\
**Replies:** 3\
**Last updated:** [June 22, 2022, 6:58pm UTC](https://discourse.julialang.org/t/raytracing-weekend-debugging-unexpected-allocations/83196 "2022-06-22T18:58:17Z")

</div>

Hello, I’m new to Julia, and am out of ideas on how to prevent my code from allocating. I’ve made a fairly naive translation of the Raytracing Weekend program into Julia. I’m aware that I’m not the first person to do th…

---

## [Fetch part of an array with indexes known by the workers](https://discourse.julialang.org/t/fetch-part-of-an-array-with-indexes-known-by-the-workers/83170)

<div class="topic-metadata">

**Author:** [@EdTi](https://discourse.julialang.org/u/EdTi)\
**Replies:** 4\
**Last updated:** [June 22, 2022, 4:58pm UTC](https://discourse.julialang.org/t/fetch-part-of-an-array-with-indexes-known-by-the-workers/83170 "2022-06-22T16:58:32Z")

</div>

Hi everyone, I’m having some troubles with the Distributed functionalities of Julia. I want to declare a matrix A on the main process and give slices of A to the workers. I launch Julia with the command julia -p 8 @ev…

---

## [What's the best way to separate elements of a vector based on its values?](https://discourse.julialang.org/t/whats-the-best-way-to-separate-elements-of-a-vector-based-on-its-values/83121)

<div class="topic-metadata">

**Author:** [@Carlose](https://discourse.julialang.org/u/Carlose)\
**Replies:** 6\
**Last updated:** [June 22, 2022, 4:14pm UTC](https://discourse.julialang.org/t/whats-the-best-way-to-separate-elements-of-a-vector-based-on-its-values/83121 "2022-06-22T16:14:35Z")

</div>

Hi all, What’s the best way to separate elements of a vector based on the value of the last member? All = \[ (15,12,875), (25,132, 333), (7,9, 201), (147,92, 201), (77,59, 333), (15,11,875), (10,12,875), (4,12,875), (2…

---

## [So, does GH actions just let me execute code for free on Microsoft's servers...?](https://discourse.julialang.org/t/so-does-gh-actions-just-let-me-execute-code-for-free-on-microsofts-servers/83003)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 6\
**Last updated:** [June 22, 2022, 4:08pm UTC](https://discourse.julialang.org/t/so-does-gh-actions-just-let-me-execute-code-for-free-on-microsofts-servers/83003 "2022-06-22T16:08:57Z")

</div>

When I push an update to my Julia package in GitHub, I have set it up to automatically run a bunch of workflows, such as CompatHelper.jl which checks for updates in my package dependencies, and a Documenter.jl script tha…

---

## [How to search an array for the index coresponding to the nearest value?](https://discourse.julialang.org/t/how-to-search-an-array-for-the-index-coresponding-to-the-nearest-value/83190)

<div class="topic-metadata">

**Author:** [@TLTYNS](https://discourse.julialang.org/u/TLTYNS)\
**Replies:** 4\
**Last updated:** [June 22, 2022, 4:01pm UTC](https://discourse.julialang.org/t/how-to-search-an-array-for-the-index-coresponding-to-the-nearest-value/83190 "2022-06-22T16:01:34Z")

</div>

I have two separate data sets and each of them have a different time axis (distance between values). I want to write a function where I provide a time(float64) and it tells me the closest index value in both arrays. I …

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

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