# \#iterative

**URL:** https://discourse.julialang.org/tag/iterative/106.md

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

---

## [The default iteration interface can cause memory leak?](https://discourse.julialang.org/t/the-default-iteration-interface-can-cause-memory-leak/88986)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 5\
**Last updated:** [October 20, 2022, 10:55pm UTC](https://discourse.julialang.org/t/the-default-iteration-interface-can-cause-memory-leak/88986 "2022-10-20T22:55:39Z")

</div>

I just read about the post “Iterate on it” which says the current implementation of iterate could cause a memory leak since the xs must remain alive over the entire loop and that is uneconomic for linked lists: next = i…

---

## [Iterate fitting linear model and extract coefficients over grouped DataFrame](https://discourse.julialang.org/t/iterate-fitting-linear-model-and-extract-coefficients-over-grouped-dataframe/84814)

<div class="topic-metadata">

**Author:** [@guysutton](https://discourse.julialang.org/u/guysutton)\
**Replies:** 4\
**Last updated:** [July 27, 2022, 10:45am UTC](https://discourse.julialang.org/t/iterate-fitting-linear-model-and-extract-coefficients-over-grouped-dataframe/84814 "2022-07-27T10:45:44Z")

</div>

I am trying to iteratively fit many models (e.g. a linear model \[GLM.jl\] or mixed model \[MixedModels.jl\]) to a DataFrame, whereby a new model is fit to each level of a grouping column. For example: if I wanted to fit one…

---

## [Matrix free GMRES with structs?](https://discourse.julialang.org/t/matrix-free-gmres-with-structs/79364)

<div class="topic-metadata">

**Author:** [@Srikumar](https://discourse.julialang.org/u/Srikumar)\
**Replies:** 3\
**Last updated:** [April 15, 2022, 9:36pm UTC](https://discourse.julialang.org/t/matrix-free-gmres-with-structs/79364 "2022-04-15T21:36:05Z")

</div>

I am wondering if there is a way to solve Ax=b with GMRES where x is not a regular vector but a struct consisting of different vectors? A is available as a linearmap/function but I am not how to use GMRES here since x is…

---

## [Mesh-Free method for CG giving method error](https://discourse.julialang.org/t/mesh-free-method-for-cg-giving-method-error/68509)

<div class="topic-metadata">

**Author:** [@Nikhil\_Singh](https://discourse.julialang.org/u/Nikhil_Singh)\
**Replies:** 1\
**Last updated:** [September 22, 2021, 3:13am UTC](https://discourse.julialang.org/t/mesh-free-method-for-cg-giving-method-error/68509 "2021-09-22T03:13:45Z")

</div>

Hi, I am attempting to develop linear operator to be used into IterativeSolver.cg. I have scripted the following for the same struct MyA Asm::SparseMatrixCSC{Float64, Int64} Freedof::Vector{Int64} Cdof::Matrix{Int64} …

---

## [ANN: MKLSparse](https://discourse.julialang.org/t/ann-mklsparse/3384)

<div class="topic-metadata">

**Author:** [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Replies:** 8\
**Last updated:** [September 4, 2021, 2:16pm UTC](https://discourse.julialang.org/t/ann-mklsparse/3384 "2021-09-04T14:16:21Z")

</div>

Hello everyone, I recently updated the MKLSparse.jl package for 0.5 and 0.6. The most useful feature of MKLSparse is likely the ability to seamlessly accelerate sparse matrix vector multiplications (which are the main …

---

## [Iterating over a DataFrame](https://discourse.julialang.org/t/iterating-over-a-dataframe/61890)

<div class="topic-metadata">

**Author:** [@mo\_re](https://discourse.julialang.org/u/mo_re)\
**Replies:** 2\
**Last updated:** [May 26, 2021, 10:16pm UTC](https://discourse.julialang.org/t/iterating-over-a-dataframe/61890 "2021-05-26T22:16:30Z")

</div>

Hey everyone! I’m really struggling with a basic concept and was hoping anyone can help me (and that I explain it well enough). Here goes… I have imported a simple 4x5 dataframe into julia and am trying to apply a func…

---

## [Collecting homogenized vectors: modify iterator vs modify collector](https://discourse.julialang.org/t/collecting-homogenized-vectors-modify-iterator-vs-modify-collector/42957)

<div class="topic-metadata">

**Author:** [@BMO](https://discourse.julialang.org/u/BMO)\
**Replies:** 3\
**Last updated:** [September 30, 2020, 5:24pm UTC](https://discourse.julialang.org/t/collecting-homogenized-vectors-modify-iterator-vs-modify-collector/42957 "2020-09-30T17:24:38Z")

</div>

Nemo is a computer algebra package for the Julia programming language. For a multivariated polynomial p there is an iterator exponent\_vectors(p) whose values are vectors corresponding to the exponents of the terms of p (…

---

## [Using the iteration interface with custom indices](https://discourse.julialang.org/t/using-the-iteration-interface-with-custom-indices/46600)

<div class="topic-metadata">

**Author:** [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Replies:** 10\
**Last updated:** [September 16, 2020, 4:17pm UTC](https://discourse.julialang.org/t/using-the-iteration-interface-with-custom-indices/46600 "2020-09-16T16:17:09Z")

</div>

I’m a bit confused on how to use iteration utilities with a custom index set. I tried a MWE (just reproducing a for loop) as follows: struct CustomIndex i::Int end struct CustomIndexSet n::Int end Base.iterate…

---

## [Iterating over the columns of a matrix](https://discourse.julialang.org/t/iterating-over-the-columns-of-a-matrix/39385)

<div class="topic-metadata">

**Author:** [@BMO](https://discourse.julialang.org/u/BMO)\
**Replies:** 3\
**Last updated:** [May 13, 2020, 10:49am UTC](https://discourse.julialang.org/t/iterating-over-the-columns-of-a-matrix/39385 "2020-05-13T10:49:12Z")

</div>

I want to iterate a function whose argument is a vector. The vectors to iterate on are the columns of a matrix. I was “slicing” the matrix into columns following Converting a matrix into an array of arrays and then itera…

---

## [Worker Proc Failing to Iterate JuliaDB Table](https://discourse.julialang.org/t/worker-proc-failing-to-iterate-juliadb-table/25046)

<div class="topic-metadata">

**Author:** [@dburch](https://discourse.julialang.org/u/dburch)\
**Replies:** 1\
**Last updated:** [June 11, 2019, 5:17pm UTC](https://discourse.julialang.org/t/worker-proc-failing-to-iterate-juliadb-table/25046 "2019-06-11T17:17:49Z")

</div>

I am getting an error when I try to iterate through a table on worker 2. I can open the table on worker 2 and println the table, but iteration which I can normally do in a serial process is failing. It errors on line 25:…

---

## [Recursive Iterators (or some other way to do this)](https://discourse.julialang.org/t/recursive-iterators-or-some-other-way-to-do-this/20216)

<div class="topic-metadata">

**Author:** [@pazzo83](https://discourse.julialang.org/u/pazzo83)\
**Replies:** 2\
**Last updated:** [January 30, 2019, 2:29pm UTC](https://discourse.julialang.org/t/recursive-iterators-or-some-other-way-to-do-this/20216 "2019-01-30T14:29:57Z")

</div>

Hi, I am experimenting with some custom iterators, and I’m wondering why this particular construction does not work as I would think (it returns nothing): struct TreeNodeLeaves{T \<: TreeNode} node::T end function i…

---

## [Last row is broken when iterating an array](https://discourse.julialang.org/t/last-row-is-broken-when-iterating-an-array/15696)

<div class="topic-metadata">

**Author:** [@loleg](https://discourse.julialang.org/u/loleg)\
**Replies:** 4\
**Last updated:** [September 30, 2018, 4:33pm UTC](https://discourse.julialang.org/t/last-row-is-broken-when-iterating-an-array/15696 "2018-09-30T16:33:00Z")

</div>

When trying to load a CSV file and use a custom iterator over its columns, the last row is broken in Julia 1.0. I’ve had to update the iterator approach, but the basic code was working in 0.6. Yes, I did test this with n…

---

## [IterTools and Visualization](https://discourse.julialang.org/t/itertools-and-visualization/12107)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 7:11am UTC](https://discourse.julialang.org/t/itertools-and-visualization/12107 "2018-07-03T07:11:29Z")

</div>

I used pmap with IterTools and product to do a a parameter study on a problem, so now I have a scalar quantity of interest generated by 3x3x3x3 different parameters. What I would like to do is plot the quantity with one…
