# Latest

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

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

**Page:** 488

---

## [How to convert Vector{Point2{Float64}} to Vector{Tuple{Float64, Float64}}:](https://discourse.julialang.org/t/how-to-convert-vector-point2-float64-to-vector-tuple-float64-float64/110026)

<div class="topic-metadata">

**Author:** [@Midez](https://discourse.julialang.org/u/Midez)\
**Replies:** 10\
**Last updated:** [February 10, 2024, 1:35pm UTC](https://discourse.julialang.org/t/how-to-convert-vector-point2-float64-to-vector-tuple-float64-float64/110026 "2024-02-10T13:35:18Z")

</div>

Actually the title says it all. How to perform this conversion ? I haven’t found anything.

---

## [How to efficiently apply user-defined functions against grouped dataframes in \`DataFrames.jl\`?](https://discourse.julialang.org/t/how-to-efficiently-apply-user-defined-functions-against-grouped-dataframes-in-dataframes-jl/109963)

<div class="topic-metadata">

**Author:** [@anon56682678](https://discourse.julialang.org/u/anon56682678)\
**Replies:** 6\
**Last updated:** [February 10, 2024, 11:46am UTC](https://discourse.julialang.org/t/how-to-efficiently-apply-user-defined-functions-against-grouped-dataframes-in-dataframes-jl/109963 "2024-02-10T11:46:59Z")

</div>

I am translating about 6k lines of R to Julia for the sake of speed and everything has been faster, significantly faster in Julia except for this specific task. I suspect what I have done below may not be the right way t…

---

## [Checking if a name is an alias](https://discourse.julialang.org/t/checking-if-a-name-is-an-alias/110024)

<div class="topic-metadata">

**Author:** [@putianyi888](https://discourse.julialang.org/u/putianyi888)\
**Replies:** 1\
**Last updated:** [February 10, 2024, 11:31am UTC](https://discourse.julialang.org/t/checking-if-a-name-is-an-alias/110024 "2024-02-10T11:31:29Z")

</div>

I’m looking for a more external/generic way to achieve sourcetypename(type::UnionAll) = sourcetypename(type.body) sourcetypename(type::DataType) = type.name.name isnotalias(type) = string(type) == string(sourcetypename(…

---

## [Using LBFGS to train Flux models](https://discourse.julialang.org/t/using-lbfgs-to-train-flux-models/109942)

<div class="topic-metadata">

**Author:** [@gradureau](https://discourse.julialang.org/u/gradureau)\
**Replies:** 10\
**Last updated:** [February 10, 2024, 7:25am UTC](https://discourse.julialang.org/t/using-lbfgs-to-train-flux-models/109942 "2024-02-10T07:25:14Z")

</div>

Hey everyone, I have found out that using LBFGS is quite used in the Physics-Informed Neural Networks and I am wondering it it is interesting to use it for usual MLPs. Is there a way to use it in Flux? Thank you for yo…

---

## [Why is the bounds-checking not elided in isassigned for \`SlowSubArray\`s despite an inbounds annotation?](https://discourse.julialang.org/t/why-is-the-bounds-checking-not-elided-in-isassigned-for-slowsubarray-s-despite-an-inbounds-annotation/110019)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [February 10, 2024, 7:12am UTC](https://discourse.julialang.org/t/why-is-the-bounds-checking-not-elided-in-isassigned-for-slowsubarray-s-despite-an-inbounds-annotation/110019 "2024-02-10T07:12:03Z")

</div>

Function definition julia\> function mycopyto!(dest::AbstractArray, src::AbstractArray) iterdest, itersrc = eachindex(dest), eachindex(src) @inbounds for I in iterdest if isassigned(s…

---

## [Dynamic Constraints in JuMP](https://discourse.julialang.org/t/dynamic-constraints-in-jump/110012)

<div class="topic-metadata">

**Author:** [@Lemma](https://discourse.julialang.org/u/Lemma)\
**Replies:** 1\
**Last updated:** [February 10, 2024, 6:28am UTC](https://discourse.julialang.org/t/dynamic-constraints-in-jump/110012 "2024-02-10T06:28:30Z")

</div>

I am working on an iterative solution for a multi-period model. The approach involves solving the model for the initial time period (t=1), then using the outcome (specifically, the values of variable z) as parameters for…

---

## [Performance tips for Union Types](https://discourse.julialang.org/t/performance-tips-for-union-types/13928)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 6\
**Last updated:** [February 9, 2024, 10:57pm UTC](https://discourse.julialang.org/t/performance-tips-for-union-types/13928 "2024-02-09T22:57:35Z")

</div>

As I’ve summed up from the scattered discourse posts, the Julia compiler has been optimised for the small Union Types. Yet, it seems, there is no information about it in the Julia docs (I’ve searched in the Performance …

---

## [Dictionary lookup errors when the struct contains empty vectors](https://discourse.julialang.org/t/dictionary-lookup-errors-when-the-struct-contains-empty-vectors/109965)

<div class="topic-metadata">

**Author:** [@kangboli](https://discourse.julialang.org/u/kangboli)\
**Replies:** 6\
**Last updated:** [February 9, 2024, 10:31pm UTC](https://discourse.julialang.org/t/dictionary-lookup-errors-when-the-struct-contains-empty-vectors/109965 "2024-02-09T22:31:49Z")

</div>

I’m running into a problem with Dict and I think it could be a bug? Julia’s documentation says that the implementation of Dict uses hash as the hashing function for the key, and isequal to determine equality, but the fol…

---

## [Error when "using Symbolics"](https://discourse.julialang.org/t/error-when-using-symbolics/109899)

<div class="topic-metadata">

**Author:** [@brombo](https://discourse.julialang.org/u/brombo)\
**Replies:** 12\
**Last updated:** [February 9, 2024, 9:29pm UTC](https://discourse.julialang.org/t/error-when-using-symbolics/109899 "2024-02-09T21:29:24Z")

</div>

I am trying to use the “Symbolics” package but when I have a program that consists only of the line “using Symbolics” I get the error - WARNING: Method definition isapprox(IntervalSets.AbstractInterval{T} where T, Inter…

---

## [Build\_function: stack overflow in type inference](https://discourse.julialang.org/t/build-function-stack-overflow-in-type-inference/109971)

<div class="topic-metadata">

**Author:** [@Johan-Gronqvist](https://discourse.julialang.org/u/Johan-Gronqvist)\
**Replies:** 4\
**Last updated:** [February 9, 2024, 9:23pm UTC](https://discourse.julialang.org/t/build-function-stack-overflow-in-type-inference/109971 "2024-02-09T21:23:23Z")

</div>

I am trying to use Symbolics.build\_function to generate JuMP.AffExpr expressions from symbolic expressions. I see an error message Internal error: stack overflow in type inference of (::RuntimeGeneratedFunctions.Runtim…

---

## [Internals of types and how they hash](https://discourse.julialang.org/t/internals-of-types-and-how-they-hash/109998)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 10\
**Last updated:** [February 9, 2024, 8:30pm UTC](https://discourse.julialang.org/t/internals-of-types-and-how-they-hash/109998 "2024-02-09T20:30:05Z")

</div>

Yes, that makes a lot more sense, occurred to me that one could just do that after I posted. I presume that Base.hash(T::DataType, h) uses the immutable parts of the DataType struct? It would kind of have to. That woul…

---

## [Is using parallel computing to create JuMP constraints possible and useful?](https://discourse.julialang.org/t/is-using-parallel-computing-to-create-jump-constraints-possible-and-useful/109992)

<div class="topic-metadata">

**Author:** [@K5Julien](https://discourse.julialang.org/u/K5Julien)\
**Replies:** 1\
**Last updated:** [February 9, 2024, 8:17pm UTC](https://discourse.julialang.org/t/is-using-parallel-computing-to-create-jump-constraints-possible-and-useful/109992 "2024-02-09T20:17:00Z")

</div>

I was wondering if there is any advantage to generate JuMP constraints with @threads regarding the CPU times. Threads.@threads for c in set\_curtailments @constraint(model, sum(x\[:, c\]) .\<= y\[c\] \* nrow(data\_s…

---

## [Using Zygote with ComponentArrays](https://discourse.julialang.org/t/using-zygote-with-componentarrays/109715)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 1\
**Last updated:** [February 9, 2024, 8:14pm UTC](https://discourse.julialang.org/t/using-zygote-with-componentarrays/109715 "2024-02-09T20:14:04Z")

</div>

I am computing gradients of functions using Zygote. The argument of my function is a ComponentArray, because my functions depend on DifferentialEquation.jl solvers using adjoint method. I have been naively assuming Zygot…

---

## [Transformations in ArnoldiMethod.jl](https://discourse.julialang.org/t/transformations-in-arnoldimethod-jl/109953)

<div class="topic-metadata">

**Author:** [@densmojd](https://discourse.julialang.org/u/densmojd)\
**Replies:** 2\
**Last updated:** [February 9, 2024, 7:21pm UTC](https://discourse.julialang.org/t/transformations-in-arnoldimethod-jl/109953 "2024-02-09T19:21:55Z")

</div>

I have a question about the documentation of “transformations” (i.e., multiplying the inverse of a matrix times a vector without explicitly forming the inverse) in ArnoldiMethod.jl, although I think the topic is of broad…

---

## [Underscore syntax and anonymous modules?](https://discourse.julialang.org/t/underscore-syntax-and-anonymous-modules/110003)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 1\
**Last updated:** [February 9, 2024, 6:18pm UTC](https://discourse.julialang.org/t/underscore-syntax-and-anonymous-modules/110003 "2024-02-09T18:18:59Z")

</div>

So I can’t do module \_ end? Is that still consistent with “syntax requires a variable but the variable is never used”? It would be useful in creating different namespaces.

---

## [Usage rules for bare underscores](https://discourse.julialang.org/t/usage-rules-for-bare-underscores/28858)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 13\
**Last updated:** [April 20, 2022, 11:58pm UTC](https://discourse.julialang.org/t/usage-rules-for-bare-underscores/28858 "2022-04-20T23:58:35Z")

</div>

I’ve seen a few examples where one can use a bare underscore in an expression, e.g., julia\> map(\_ -\> "hello", 1:4) 4-element Array{String,1}: "hello" "hello" "hello" "hello" julia\> \["hello" for \_ in 1:4\] 4-element …

---

## [Why do hash functions use xor to combine multiple values?](https://discourse.julialang.org/t/why-do-hash-functions-use-xor-to-combine-multiple-values/109967)

<div class="topic-metadata">

**Author:** [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Replies:** 11\
**Last updated:** [February 9, 2024, 5:15pm UTC](https://discourse.julialang.org/t/why-do-hash-functions-use-xor-to-combine-multiple-values/109967 "2024-02-09T17:15:24Z")

</div>

Continuing the discussion from Dictionary lookup errors when the struct contains empty vectors: Usually in these hash function one sees xor being used to combine the results of multiple values. I myself usually also us…

---

## [How to convert 3D mesh to voxelated array image?](https://discourse.julialang.org/t/how-to-convert-3d-mesh-to-voxelated-array-image/21777)

<div class="topic-metadata">

**Author:** [@jonalm](https://discourse.julialang.org/u/jonalm)\
**Replies:** 8\
**Last updated:** [February 9, 2024, 5:40pm UTC](https://discourse.julialang.org/t/how-to-convert-3d-mesh-to-voxelated-array-image/21777 "2024-02-09T17:40:02Z")

</div>

Dear community. I’m looking for some image related functionality which may already be implemented in Julia. I haven’t managed to find them, but that may be because I do not know what to search for (I’ve limited experienc…

---

## [Compiling julia code into static binary](https://discourse.julialang.org/t/compiling-julia-code-into-static-binary/109996)

<div class="topic-metadata">

**Author:** [@gradureau](https://discourse.julialang.org/u/gradureau)\
**Replies:** 0\
**Last updated:** [February 9, 2024, 4:58pm UTC](https://discourse.julialang.org/t/compiling-julia-code-into-static-binary/109996 "2024-02-09T16:58:18Z")

</div>

Hey everyone, I have a program that uses julia modules and I would like to generate a binary that could be used independently. I have seen some posts on the matter that don’t give me the solution I am looking for and s…

---

## [Finding the rank of an augmented matrix](https://discourse.julialang.org/t/finding-the-rank-of-an-augmented-matrix/109988)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 2\
**Last updated:** [February 9, 2024, 4:09pm UTC](https://discourse.julialang.org/t/finding-the-rank-of-an-augmented-matrix/109988 "2024-02-09T16:09:29Z")

</div>

I want to determine if a system of equations has no solutions. According to Wikipedia a system of equations has no solutions if its augmented matrix has higher rank than its coefficient matrix. In Julia the natural way…

---

## [PDE system in Acasual modeling](https://discourse.julialang.org/t/pde-system-in-acasual-modeling/109990)

<div class="topic-metadata">

**Author:** [@Sushrut\_Deshpande](https://discourse.julialang.org/u/Sushrut_Deshpande)\
**Replies:** 1\
**Last updated:** [February 9, 2024, 4:35pm UTC](https://discourse.julialang.org/t/pde-system-in-acasual-modeling/109990 "2024-02-09T16:35:58Z")

</div>

Hello, Thank you for making modeling toolkit. I really enjoy it!! I wanted to know if there is any elegant/simple way to model PDE systems inside “acasual modeling” method of Modelingtoolkit? I can generally solve P…

---

## [Problem using functions from ScenTrees Package](https://discourse.julialang.org/t/problem-using-functions-from-scentrees-package/109985)

<div class="topic-metadata">

**Author:** [@heiwie](https://discourse.julialang.org/u/heiwie)\
**Replies:** 3\
**Last updated:** [February 9, 2024, 3:23pm UTC](https://discourse.julialang.org/t/problem-using-functions-from-scentrees-package/109985 "2024-02-09T15:23:07Z")

</div>

I am trying to run the same code as in the official github repo for the ScenTrees package (GitHub - aloispichler/ScenTrees.jl: Julia Package for Generating Scenario Trees and Scenario Lattices for Multistage Stochastic O…

---

## [Array addition in Enzyme](https://discourse.julialang.org/t/array-addition-in-enzyme/109901)

<div class="topic-metadata">

**Author:** [@jwalker](https://discourse.julialang.org/u/jwalker)\
**Replies:** 7\
**Last updated:** [February 9, 2024, 3:13pm UTC](https://discourse.julialang.org/t/array-addition-in-enzyme/109901 "2024-02-09T15:13:07Z")

</div>

There are a couple of issues in here, but they’re related in how I discovered them. In attempting to test Enzyme on some basic vector operations, I came across a problem with derivatives of the addition function. In par…

---

## [Running a Julia script from MATLAB using system()](https://discourse.julialang.org/t/running-a-julia-script-from-matlab-using-system/109931)

<div class="topic-metadata">

**Author:** [@rakshith95](https://discourse.julialang.org/u/rakshith95)\
**Replies:** 1\
**Last updated:** [February 9, 2024, 3:08pm UTC](https://discourse.julialang.org/t/running-a-julia-script-from-matlab-using-system/109931 "2024-02-09T15:08:26Z")

</div>

Hello, I’m trying to run a Julia .jl script in a MATLAB program using the system command. The script runs perfectly fine, when I attempt to do so from the terminal, but I get a segmentation fault when I try to run it th…

---

## [Calling functions from another script](https://discourse.julialang.org/t/calling-functions-from-another-script/109978)

<div class="topic-metadata">

**Author:** [@Mishal](https://discourse.julialang.org/u/Mishal)\
**Replies:** 2\
**Last updated:** [February 9, 2024, 2:58pm UTC](https://discourse.julialang.org/t/calling-functions-from-another-script/109978 "2024-02-09T14:58:11Z")

</div>

Hi Guys I am currently converting my FEM toolbox I made on Matlab to Julia. I am having issues calling functions from other scripts. the function is: function assembly(q, T, ke, npe, dof, n) # Create a blank globa…

---

## [Select a dictionary in a vector based on a specific entry value](https://discourse.julialang.org/t/select-a-dictionary-in-a-vector-based-on-a-specific-entry-value/109876)

<div class="topic-metadata">

**Author:** [@sardinecan](https://discourse.julialang.org/u/sardinecan)\
**Replies:** 4\
**Last updated:** [February 9, 2024, 2:48pm UTC](https://discourse.julialang.org/t/select-a-dictionary-in-a-vector-based-on-a-specific-entry-value/109876 "2024-02-09T14:48:54Z")

</div>

Hi everyone, I’m looking for an easy way to filter/select dict in vector based on the value of one of the key. In the example below, I need to find the title of a data, given by the first Dict of the vector (but it is …

---

## [Interactively cropping a TIFF stack?](https://discourse.julialang.org/t/interactively-cropping-a-tiff-stack/66020)

<div class="topic-metadata">

**Author:** [@DTL](https://discourse.julialang.org/u/DTL)\
**Replies:** 7\
**Last updated:** [February 9, 2024, 2:42pm UTC](https://discourse.julialang.org/t/interactively-cropping-a-tiff-stack/66020 "2024-02-09T14:42:46Z")

</div>

I’ve got some 8-bit TIFF stacks, on the order of 300x300x150 (x \* y \* slices) in size. I can load these into Julia fine and display them, what I’d really like to be able to do now is interactively crop out a region defin…

---

## [Can this be written even faster? (CPU)](https://discourse.julialang.org/t/can-this-be-written-even-faster-cpu/109924)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 34\
**Last updated:** [February 9, 2024, 2:24pm UTC](https://discourse.julialang.org/t/can-this-be-written-even-faster-cpu/109924 "2024-02-09T14:24:35Z")

</div>

Hello! My usual experience has been that when I think something is as fast as I think it can be, then someone shows me how to do it even faster :slight\_smile: I’ve made a script attached below with a serial version and…

---

## [Pre-processing data within a Julia structure](https://discourse.julialang.org/t/pre-processing-data-within-a-julia-structure/109979)

<div class="topic-metadata">

**Author:** [@RogerV](https://discourse.julialang.org/u/RogerV)\
**Replies:** 2\
**Last updated:** [February 9, 2024, 1:24pm UTC](https://discourse.julialang.org/t/pre-processing-data-within-a-julia-structure/109979 "2024-02-09T13:24:24Z")

</div>

I would like to have a Julia structure with data and parameters contained with it, to be used with various functions. E.g., I start with data frame of numbers, but many functions use it as a matrix and also need to know …

---

## [Columns and Constraints generation](https://discourse.julialang.org/t/columns-and-constraints-generation/103813)

<div class="topic-metadata">

**Author:** [@Salma](https://discourse.julialang.org/u/Salma)\
**Replies:** 13\
**Last updated:** [February 9, 2024, 1:16pm UTC](https://discourse.julialang.org/t/columns-and-constraints-generation/103813 "2024-02-09T13:16:40Z")

</div>

Hello, I’m looking to implement two-stage robust optimization using column and constraint generation. I’ve encountered an issue within while loop related to the optimize!() function when trying to implement the algorithm…

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

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