# Latest

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

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

**Page:** 802

---

## [Strange behavior of mod with float](https://discourse.julialang.org/t/strange-behavior-of-mod-with-float/93536)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 3\
**Last updated:** [January 25, 2023, 10:52pm UTC](https://discourse.julialang.org/t/strange-behavior-of-mod-with-float/93536 "2023-01-25T22:52:12Z")

</div>

Hello, What is the best way to determine if a float number b is an integer multiple of another float number a, (i.e. b = k a with k an integer)? I wanted to use the following test abs(mod(b, a))\<1e-12, but I am confuse…

---

## [Taking advantage of pkgimages in 'scripts'](https://discourse.julialang.org/t/taking-advantage-of-pkgimages-in-scripts/93535)

<div class="topic-metadata">

**Author:** [@Mason](https://discourse.julialang.org/u/Mason)\
**Replies:** 2\
**Last updated:** [January 25, 2023, 10:47pm UTC](https://discourse.julialang.org/t/taking-advantage-of-pkgimages-in-scripts/93535 "2023-01-25T22:47:23Z")

</div>

There’s a lot of benchmark scripts out there right now where Julia is at a big disadvantage due to compiler overhead and such. Has anyone thought out an easy way that we can start taking advantage of pkgimages to reduce …

---

## [How to access the rule set of ChainRules.jl?](https://discourse.julialang.org/t/how-to-access-the-rule-set-of-chainrules-jl/93534)

<div class="topic-metadata">

**Author:** [@Jonas208](https://discourse.julialang.org/u/Jonas208)\
**Replies:** 2\
**Last updated:** [January 25, 2023, 8:24pm UTC](https://discourse.julialang.org/t/how-to-access-the-rule-set-of-chainrules-jl/93534 "2023-01-25T20:24:38Z")

</div>

I’m not quite sure if I chose the right domain. However, this question is about automatic differentiation. My plan is to overload all functions (for my own tracked real/array type) for which rules exist in ChainRules.jl…

---

## [What's an interactive task? Does it pause a running task?](https://discourse.julialang.org/t/whats-an-interactive-task-does-it-pause-a-running-task/93532)

<div class="topic-metadata">

**Author:** [@Ashlin\_Harris](https://discourse.julialang.org/u/Ashlin_Harris)\
**Replies:** 0\
**Last updated:** [January 25, 2023, 7:47pm UTC](https://discourse.julialang.org/t/whats-an-interactive-task-does-it-pause-a-running-task/93532 "2023-01-25T19:47:15Z")

</div>

Julia 1.9 includes interactive tasks, but I can’t find an example or a description of what they do. I assume that they designate low latency tasks that should take priority over other tasks. For instance, in the followin…

---

## [Order in which macros are processed](https://discourse.julialang.org/t/order-in-which-macros-are-processed/93530)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 0\
**Last updated:** [January 25, 2023, 7:03pm UTC](https://discourse.julialang.org/t/order-in-which-macros-are-processed/93530 "2023-01-25T19:03:45Z")

</div>

Given the following code in a file called “TestMacro.jl”: module TestMacro import Base struct Glob end export Glob macro define() :(Base.:\*(a::Glob, b::Glob) = "here") end @define Base.:\*(a::Glob, b::Glob) = "th…

---

## [Stateful iterators with known eltype](https://discourse.julialang.org/t/stateful-iterators-with-known-eltype/93528)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [January 25, 2023, 6:46pm UTC](https://discourse.julialang.org/t/stateful-iterators-with-known-eltype/93528 "2023-01-25T18:46:04Z")

</div>

Iterators.Stateful tries to determine the type of the (value, state) tuple using internal introspection tools. This can be complicated if the type of state keeps changing across iterations, and in such cases the inferred…

---

## [FLoops @init allocate only once](https://discourse.julialang.org/t/floops-init-allocate-only-once/93500)

<div class="topic-metadata">

**Author:** [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Replies:** 13\
**Last updated:** [January 25, 2023, 6:34pm UTC](https://discourse.julialang.org/t/floops-init-allocate-only-once/93500 "2023-01-25T18:34:54Z")

</div>

Hi, Does anyone know if there are any tricks to using FLoops thread-safe buffers for better performance? I am trying to adapt my code which makes use of Buffers such as Buffers\[Threads.threadid()\] to the recommended app…

---

## [An error in implementation of "for" loop while using "IntervalArithmetic.jl" package in "Pluto.jl" notebook](https://discourse.julialang.org/t/an-error-in-implementation-of-for-loop-while-using-intervalarithmetic-jl-package-in-pluto-jl-notebook/93523)

<div class="topic-metadata">

**Author:** [@Kanishk](https://discourse.julialang.org/u/Kanishk)\
**Replies:** 1\
**Last updated:** [January 25, 2023, 6:11pm UTC](https://discourse.julialang.org/t/an-error-in-implementation-of-for-loop-while-using-intervalarithmetic-jl-package-in-pluto-jl-notebook/93523 "2023-01-25T18:11:24Z")

</div>

Hello I am trying to find a root of an equation using Interval Newton method in Julia. I am using “IntervalArithmetic.jl” package in “Pluto.jl” notebook. The code seems logically correct (checked a few times) but it is …

---

## [Optional multiple dispatch with Glue Packages?](https://discourse.julialang.org/t/optional-multiple-dispatch-with-glue-packages/93480)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 8\
**Last updated:** [January 25, 2023, 5:44pm UTC](https://discourse.julialang.org/t/optional-multiple-dispatch-with-glue-packages/93480 "2023-01-25T17:44:54Z")

</div>

Now that built in glue packages are on their way, I wonder if it is worthwhile to consider a new design pattern of optional multiple dispatch. Typically in Julia we tend to take advantage of multiple dispatch rather tha…

---

## [Change window icon in GLMakie?](https://discourse.julialang.org/t/change-window-icon-in-glmakie/93517)

<div class="topic-metadata">

**Author:** [@Ertyk](https://discourse.julialang.org/u/Ertyk)\
**Replies:** 2\
**Last updated:** [January 25, 2023, 5:50pm UTC](https://discourse.julialang.org/t/change-window-icon-in-glmakie/93517 "2023-01-25T17:50:13Z")

</div>

Hello, Is there a way to change the window icon in GLMakie?

---

## [Constraints in NeuralPDE.NNODE?](https://discourse.julialang.org/t/constraints-in-neuralpde-nnode/92723)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 4\
**Last updated:** [January 25, 2023, 4:49pm UTC](https://discourse.julialang.org/t/constraints-in-neuralpde-nnode/92723 "2023-01-25T16:49:27Z")

</div>

Hi everyone, I’m trying to implement a toy example of running NeuralPDE.NNODE to add to my repository of SIR models. Here’s what I have, which doesn’t work well. using OrdinaryDiffEq using NeuralPDE using Flux using Op…

---

## [How to record interactive visualisation with cursor clicking?](https://discourse.julialang.org/t/how-to-record-interactive-visualisation-with-cursor-clicking/93465)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 7\
**Last updated:** [January 25, 2023, 4:39pm UTC](https://discourse.julialang.org/t/how-to-record-interactive-visualisation-with-cursor-clicking/93465 "2023-01-25T16:39:47Z")

</div>

I have an interactive topoplot: clicking on a channel marker shows its name. I want to record it so that I can see how I press a marker with the cursor and its name changes. Do you know how to do this? I tried, but the …

---

## [Disappearing methods from loaded libraries, seemingly iff \`using PreallocationTools\`](https://discourse.julialang.org/t/disappearing-methods-from-loaded-libraries-seemingly-iff-using-preallocationtools/93496)

<div class="topic-metadata">

**Author:** [@joaovgranja](https://discourse.julialang.org/u/joaovgranja)\
**Replies:** 6\
**Last updated:** [January 25, 2023, 4:32pm UTC](https://discourse.julialang.org/t/disappearing-methods-from-loaded-libraries-seemingly-iff-using-preallocationtools/93496 "2023-01-25T16:32:50Z")

</div>

I have a weird issue that I am unable to reproduce in a MWE. It happens in the context of a reasonably large project. Some methods are not available despite their libraries being loaded. For instance: MethodError: no m…

---

## [Providing custom REPL PathCompletions](https://discourse.julialang.org/t/providing-custom-repl-pathcompletions/93515)

<div class="topic-metadata">

**Author:** [@JonasIsensee](https://discourse.julialang.org/u/JonasIsensee)\
**Replies:** 0\
**Last updated:** [January 25, 2023, 3:46pm UTC](https://discourse.julialang.org/t/providing-custom-repl-pathcompletions/93515 "2023-01-25T15:46:15Z")

</div>

Hierarchical dataformats such as HDF5.jl and JLD2.jl use path-like strings to refer to datasets, e.g. julia\> using JLD2 julia\> f = jldopen("20200918\_02\_rodcell\_bigdomain000012.h5") ┌ Warning: This file was not written …

---

## [ProgressMeter in Pluto](https://discourse.julialang.org/t/progressmeter-in-pluto/69190)

<div class="topic-metadata">

**Author:** [@Jon\_Norberg](https://discourse.julialang.org/u/Jon_Norberg)\
**Replies:** 2\
**Last updated:** [January 25, 2023, 2:54pm UTC](https://discourse.julialang.org/t/progressmeter-in-pluto/69190 "2023-01-25T14:54:07Z")

</div>

I vaguely remember this being addressed in one of the many Pluto videos, but I am not sure. So my question is: can I use ProgressMeter, or something similar to show the progress of a loop inside a Pluto cell? Right now, …

---

## [Dynamic Variable and Constraint Scaling built on JuMP](https://discourse.julialang.org/t/dynamic-variable-and-constraint-scaling-built-on-jump/93463)

<div class="topic-metadata">

**Author:** [@max](https://discourse.julialang.org/u/max)\
**Replies:** 2\
**Last updated:** [January 25, 2023, 2:01pm UTC](https://discourse.julialang.org/t/dynamic-variable-and-constraint-scaling-built-on-jump/93463 "2023-01-25T14:01:48Z")

</div>

Hello all, I use JuMP and Gurobi to set up and solve optimization problems. I have from time to time the problem that the built optimization problems are badly scaled. To take a first step in improved matrix ranges I ha…

---

## [Packages in the Project.toml file are not found in the project](https://discourse.julialang.org/t/packages-in-the-project-toml-file-are-not-found-in-the-project/93494)

<div class="topic-metadata">

**Author:** [@devanshu](https://discourse.julialang.org/u/devanshu)\
**Replies:** 3\
**Last updated:** [January 25, 2023, 1:53pm UTC](https://discourse.julialang.org/t/packages-in-the-project-toml-file-are-not-found-in-the-project/93494 "2023-01-25T13:53:36Z")

</div>

Hi, I have a project named HeisenbergMBL. While precompiling in the project environment I get the following error, (HeisenbergMBL) pkg\> precompile Precompiling project... ✗ HeisenbergMBL 0 dependencies successfully…

---

## [Equivalent of Stateful in IterTools](https://discourse.julialang.org/t/equivalent-of-stateful-in-itertools/93510)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 1\
**Last updated:** [January 25, 2023, 1:45pm UTC](https://discourse.julialang.org/t/equivalent-of-stateful-in-itertools/93510 "2023-01-25T13:45:38Z")

</div>

Hello, The package Base.Iterators has been deprecated for many years now, in favor of IterTools. But I don’t see the equivalent of the Stateful iterator in IterTools’ documentation. Is it in another package ?

---

## [Issue Arpack computing eigs](https://discourse.julialang.org/t/issue-arpack-computing-eigs/93254)

<div class="topic-metadata">

**Author:** [@Sparsetacus](https://discourse.julialang.org/u/Sparsetacus)\
**Replies:** 1\
**Last updated:** [January 25, 2023, 1:31pm UTC](https://discourse.julialang.org/t/issue-arpack-computing-eigs/93254 "2023-01-25T13:31:36Z")

</div>

Hi all, I have a weird error using Arpack.jl. I am using eigs to compute a generalized eigenvalue problem for large, symmetric, sparse matrices, i.e. eigs(A, B, nev = 1, which = :SM). I am using julia 1.8.5 on ubuntu …

---

## [How to reduce the left margin of plot with PyPlot?](https://discourse.julialang.org/t/how-to-reduce-the-left-margin-of-plot-with-pyplot/93507)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 0\
**Last updated:** [January 25, 2023, 12:51pm UTC](https://discourse.julialang.org/t/how-to-reduce-the-left-margin-of-plot-with-pyplot/93507 "2023-01-25T12:51:45Z")

</div>

Hello, I am plotting with PyPlot adding a legend on the right side with legend(handles = \[active\_contour, passive\_contour\], bbox\_to\_anchor=\[1.2,1\], loc=2, borderaxespad=0, title="Margins", fancybox="true") The l…

---

## [Plotting histogram on the y-axis at the end of a time series](https://discourse.julialang.org/t/plotting-histogram-on-the-y-axis-at-the-end-of-a-time-series/5381)

<div class="topic-metadata">

**Author:** [@chase](https://discourse.julialang.org/u/chase)\
**Replies:** 9\
**Last updated:** [October 21, 2017, 9:52pm UTC](https://discourse.julialang.org/t/plotting-histogram-on-the-y-axis-at-the-end-of-a-time-series/5381 "2017-10-21T21:52:31Z")

</div>

I came across a figure which had a visualization I really liked. It shows the time series of some simulations and then has the histogram of the end state of the system plotted on a new, rotated axis. I know this plot was…

---

## [Unexpected result with mutable structs](https://discourse.julialang.org/t/unexpected-result-with-mutable-structs/93457)

<div class="topic-metadata">

**Author:** [@SpinolaHours](https://discourse.julialang.org/u/SpinolaHours)\
**Replies:** 7\
**Last updated:** [January 25, 2023, 11:36am UTC](https://discourse.julialang.org/t/unexpected-result-with-mutable-structs/93457 "2023-01-25T11:36:46Z")

</div>

Hi there, I have a mutable struct defined as follows: mutable struct Test a::Float64 b::Float64 c::Float64 end Test(a,b) = Test(a,b,a+b) I had expected when I update either of fields a or b that c would a…

---

## [Should Diagonal(A) give an InexactError if not isdiag(A)?](https://discourse.julialang.org/t/should-diagonal-a-give-an-inexacterror-if-not-isdiag-a/93464)

<div class="topic-metadata">

**Author:** [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Replies:** 3\
**Last updated:** [January 25, 2023, 11:33am UTC](https://discourse.julialang.org/t/should-diagonal-a-give-an-inexacterror-if-not-isdiag-a/93464 "2023-01-25T11:33:53Z")

</div>

I understand the convenience of not having to do Diagonal(diag(A)), but with the same logic Int(1.2) should give 1. I would expect an InexactError, if isdiag(A) == false.

---

## [\[ANN\] CondaPkg.jl v0.2.6 - now with REPL integration!](https://discourse.julialang.org/t/ann-condapkg-jl-v0-2-6-now-with-repl-integration/75370)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 27\
**Last updated:** [January 25, 2023, 11:30am UTC](https://discourse.julialang.org/t/ann-condapkg-jl-v0-2-6-now-with-repl-integration/75370 "2023-01-25T11:30:14Z")

</div>

(I don’t often post about new versions of packages, but I thought this was was pretty cool, so…) I’ve just released v0.2.6 of CondaPkg.jl, the Pkg-like package for adding Conda dependencies to your Julia project. Pkg R…

---

## [How to read hex columns in CSV files](https://discourse.julialang.org/t/how-to-read-hex-columns-in-csv-files/93493)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 12\
**Last updated:** [January 25, 2023, 11:12am UTC](https://discourse.julialang.org/t/how-to-read-hex-columns-in-csv-files/93493 "2023-01-25T11:12:25Z")

</div>

I have the following code: using DLMReader ds = filereader(logfile\_name, types = \[Float64, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int\], header=\[:time, :RTR, :addr, :F…

---

## [About PProf](https://discourse.julialang.org/t/about-pprof/93456)

<div class="topic-metadata">

**Author:** [@Kristin](https://discourse.julialang.org/u/Kristin)\
**Replies:** 8\
**Last updated:** [January 25, 2023, 10:43am UTC](https://discourse.julialang.org/t/about-pprof/93456 "2023-01-25T10:43:29Z")

</div>

Dear there, I’ve a quick question about PProf. I’m using Julia 1.8.4, and I’m learning the new profile tool. So I follow a simple example as below. I first define a function: function myfunc() A = rand(200, 200,…

---

## [How to pass any number of symbols to a macro using a function?](https://discourse.julialang.org/t/how-to-pass-any-number-of-symbols-to-a-macro-using-a-function/93497)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 0\
**Last updated:** [January 25, 2023, 10:20am UTC](https://discourse.julialang.org/t/how-to-pass-any-number-of-symbols-to-a-macro-using-a-function/93497 "2023-01-25T10:20:11Z")

</div>

How to pass any number of symbols to a macro using a function? function func(args::Vararg{Symbol, N}) where N # return @macros x y z # \`x, y, z\` from \`args\` end func(:x, :y, :z) # -\> @macro x y z

---

## [What does the \`primary\` attribute do and how to plot curves with scatters added onto it in \`Plots.jl\`?](https://discourse.julialang.org/t/what-does-the-primary-attribute-do-and-how-to-plot-curves-with-scatters-added-onto-it-in-plots-jl/93486)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 1\
**Last updated:** [January 25, 2023, 9:17am UTC](https://discourse.julialang.org/t/what-does-the-primary-attribute-do-and-how-to-plot-curves-with-scatters-added-onto-it-in-plots-jl/93486 "2023-01-25T09:17:03Z")

</div>

For example, we have the following recipe: using RecipesBase: @userplot, @recipe, @series @userplot MyPlot @recipe function f(plot::MyPlot) x, y = plot.args palette --\> :tab20 @series begin seriesty…

---

## [Group by value in column](https://discourse.julialang.org/t/group-by-value-in-column/93473)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 7\
**Last updated:** [January 25, 2023, 8:42am UTC](https://discourse.julialang.org/t/group-by-value-in-column/93473 "2023-01-25T08:42:55Z")

</div>

How do I get 3 groups here based on the column value? In this case when you find a word all in capitals. df = DataFrame(a = \["HOLA", 2,3,"HELLO", 4,5,6, "HALLO", 7,8,9,10\], b = rand(12), c=rand(12)) I want to get 3 gro…

---

## [DataFrame: how to change value of a cell without knowing the row number](https://discourse.julialang.org/t/dataframe-how-to-change-value-of-a-cell-without-knowing-the-row-number/22024)

<div class="topic-metadata">

**Author:** [@johann.spies](https://discourse.julialang.org/u/johann.spies)\
**Replies:** 23\
**Last updated:** [January 25, 2023, 8:30am UTC](https://discourse.julialang.org/t/dataframe-how-to-change-value-of-a-cell-without-knowing-the-row-number/22024 "2023-01-25T08:30:46Z")

</div>

In the following DataFrame, how do I change the age of Sally without knowing the row number and without changing any other values in the DataFrame? I have looked at the DataFrames, DataframesMeta and Query documentation…

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

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