# Latest

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

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

**Page:** 1457

---

## [Access variale between testsets](https://discourse.julialang.org/t/access-variale-between-testsets/57390)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 2\
**Last updated:** [March 17, 2021, 3:15pm UTC](https://discourse.julialang.org/t/access-variale-between-testsets/57390 "2021-03-17T15:15:56Z")

</div>

How can I take result from first testset and use it in second testset? global result = 0; @time @testset verbose=true "Upload" begin println(result) result = 1 end @time @testset verbose=true "Update" begin …

---

## [Base.show() for displaying MathJax formulas in Jupyter / IJulia?](https://discourse.julialang.org/t/base-show-for-displaying-mathjax-formulas-in-jupyter-ijulia/57244)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 6\
**Last updated:** [March 17, 2021, 2:36pm UTC](https://discourse.julialang.org/t/base-show-for-displaying-mathjax-formulas-in-jupyter-ijulia/57244 "2021-03-17T14:36:45Z")

</div>

I’d like to override Base.show() for a custom type I defined, to displayed an object of the type as a math formula (MathJax / LaTeX) when using Jupyter notebook. How can this be done? I already know how to override Base.…

---

## [Abstract parametric constructors](https://discourse.julialang.org/t/abstract-parametric-constructors/57387)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 5\
**Last updated:** [March 17, 2021, 2:35pm UTC](https://discourse.julialang.org/t/abstract-parametric-constructors/57387 "2021-03-17T14:35:04Z")

</div>

How can I create a constructor for a parametric type using its abstract supertype? This is my minimal nonworking example :wink: abstract type MyNumber{T1\<:Integer,T2\<:Integer} end struct MyNumber1{T1,T2} \<: MyNumber{T…

---

## [Saving/Loading folders with DrWatson.jl](https://discourse.julialang.org/t/saving-loading-folders-with-drwatson-jl/56741)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 7\
**Last updated:** [March 17, 2021, 1:58pm UTC](https://discourse.julialang.org/t/saving-loading-folders-with-drwatson-jl/56741 "2021-03-17T13:58:42Z")

</div>

Hello! I started trying DrWatson out in the hope of tidying up my currently very messy workflow. I’ve run into a problem however - I save two custom types by saving various .csv and .yaml files into a folder. I then load…

---

## [I have some nice custom prinitng of an array, but I want to configure the operatio](https://discourse.julialang.org/t/i-have-some-nice-custom-prinitng-of-an-array-but-i-want-to-configure-the-operatio/57384)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 17, 2021, 1:56pm UTC](https://discourse.julialang.org/t/i-have-some-nice-custom-prinitng-of-an-array-but-i-want-to-configure-the-operatio/57384 "2021-03-17T13:56:07Z")

</div>

I have some nice custom prinitng of an array, but I want to configure the operation Base.print\_matrix(IOContext(io, :compact =&gt; true, :limit =&gt; true), A) so that it takes less rows that the fully available rows of …

---

## [Possible bug using plan\_irfft and plan\_rfft with mul! and ldiv!](https://discourse.julialang.org/t/possible-bug-using-plan-irfft-and-plan-rfft-with-mul-and-ldiv/57374)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 2\
**Last updated:** [March 17, 2021, 1:54pm UTC](https://discourse.julialang.org/t/possible-bug-using-plan-irfft-and-plan-rfft-with-mul-and-ldiv/57374 "2021-03-17T13:54:32Z")

</div>

Hello, I found a strange behaviour while using precomputed plans in 2D of real fft, plan\_rfft and plan\_irfft, with the function mul! and ldiv! from the LinearAlbegra package. For example, when computing the inverse tran…

---

## [Frequency Weights in DataFrames](https://discourse.julialang.org/t/frequency-weights-in-dataframes/57379)

<div class="topic-metadata">

**Author:** [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Replies:** 2\
**Last updated:** [March 17, 2021, 1:31pm UTC](https://discourse.julialang.org/t/frequency-weights-in-dataframes/57379 "2021-03-17T13:31:26Z")

</div>

Hello, I need to compute a group mean using frequency weights and I do not know how to do it. I know how to compute an un weighted mean: using DataFrames df = DataFrame(age = rand(25:30, 25), value = rand(25), fweigh…

---

## [Writing file inside a loop](https://discourse.julialang.org/t/writing-file-inside-a-loop/57376)

<div class="topic-metadata">

**Author:** [@ccmejia](https://discourse.julialang.org/u/ccmejia)\
**Replies:** 4\
**Last updated:** [March 17, 2021, 1:18pm UTC](https://discourse.julialang.org/t/writing-file-inside-a-loop/57376 "2021-03-17T13:18:15Z")

</div>

Hi there! I’m running some stuff in a cluster… Due to this take long time calculations I would like to follow some kind of output file to know how it is going… It seems that inside a loop the output file is not modified…

---

## [\[ANN\] LibDeflate.jl and CodecBGZF.jl - really fast blocked de/compression](https://discourse.julialang.org/t/ann-libdeflate-jl-and-codecbgzf-jl-really-fast-blocked-de-compression/45410)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 9\
**Last updated:** [March 17, 2021, 1:06pm UTC](https://discourse.julialang.org/t/ann-libdeflate-jl-and-codecbgzf-jl-really-fast-blocked-de-compression/45410 "2021-03-17T13:06:56Z")

</div>

Here I introduce the new packages LibDeflate.jl and CodecBGZF.jl. Both packages are newly registered, and I would love to get comments. LibDeflate.jl LibDeflate.jl is a thin wrapper around libdeflate, the fastest implem…

---

## [@code\_warntype does not warn about Array{Any}](https://discourse.julialang.org/t/code-warntype-does-not-warn-about-array-any/57191)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 11\
**Last updated:** [March 17, 2021, 1:00pm UTC](https://discourse.julialang.org/t/code-warntype-does-not-warn-about-array-any/57191 "2021-03-17T13:00:06Z")

</div>

Shouldn’t @code\_warntype flag (in red) the fact that the return value of this function is an array of Any? The macro notes the Any, but does not make it red. struct T x::Int32 y::Int32 end function test\_warnty…

---

## [Organisation of a diverse library in submodules using Reexport and ForceImport](https://discourse.julialang.org/t/organisation-of-a-diverse-library-in-submodules-using-reexport-and-forceimport/57377)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 0\
**Last updated:** [March 17, 2021, 12:50pm UTC](https://discourse.julialang.org/t/organisation-of-a-diverse-library-in-submodules-using-reexport-and-forceimport/57377 "2021-03-17T12:50:35Z")

</div>

I have a Machine Learning library with different stuff that I am keeping organised in submodules. I use submodules because (1) They actually make “logical” sense to classify them in submodules; (2) They integrate nicely …

---

## [Does @benchmark accurately track PyCall allocations?](https://discourse.julialang.org/t/does-benchmark-accurately-track-pycall-allocations/57375)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 2\
**Last updated:** [March 17, 2021, 12:41pm UTC](https://discourse.julialang.org/t/does-benchmark-accurately-track-pycall-allocations/57375 "2021-03-17T12:41:37Z")

</div>

In the few instances I have tried to compare PyCall+@benchmark versus timteit within Python, I get runtimes that are very similar (occasionally timing Python from Julia is 1-2 ms faster for some reason). But, does @bench…

---

## [What is difference between Type{T} and T](https://discourse.julialang.org/t/what-is-difference-between-type-t-and-t/19325)

<div class="topic-metadata">

**Author:** [@vickysharma0812](https://discourse.julialang.org/u/vickysharma0812)\
**Replies:** 57\
**Last updated:** [March 17, 2021, 12:18pm UTC](https://discourse.julialang.org/t/what-is-difference-between-type-t-and-t/19325 "2021-03-17T12:18:58Z")

</div>

Hello everyone, I have just started to learn about Julia(\<:1.0). Unfortunately, I am not able to understand the use/functionality of Type{T}, for example, in convert(::Type{T}, a::T) where {T\<:AbstractArray} = a why …

---

## [No method matching iterate(::XLSX.Worksheet)](https://discourse.julialang.org/t/no-method-matching-iterate-xlsx-worksheet/57371)

<div class="topic-metadata">

**Author:** [@Yaropro14](https://discourse.julialang.org/u/Yaropro14)\
**Replies:** 1\
**Last updated:** [March 17, 2021, 12:14pm UTC](https://discourse.julialang.org/t/no-method-matching-iterate-xlsx-worksheet/57371 "2021-03-17T12:14:15Z")

</div>

file = XLSX.readxlsx(“ASG data 14.06.2018 (new data).xlsx”) f\_curves = file\[“Curves”\] DP = f\_curves\[“C48:C56”\] # (old) peak power consumption forecast by 2035, GW Seasons = f\_curves\[“B28:E36”\] D=Seasons.\*DP f\_gen\_an…

---

## [Error message in array indexing](https://discourse.julialang.org/t/error-message-in-array-indexing/57322)

<div class="topic-metadata">

**Author:** [@Jussi\_Salmela](https://discourse.julialang.org/u/Jussi_Salmela)\
**Replies:** 5\
**Last updated:** [March 17, 2021, 11:57am UTC](https://discourse.julialang.org/t/error-message-in-array-indexing/57322 "2021-03-17T11:57:20Z")

</div>

Hi! I’m on Julia 1.5.3 The last expression is the result of a typing error that I made. The previous expression is something I was aiming to type. Probably this is something that I should know but here goes. In REPL ; …

---

## [How to use a function to retrieve a single row of data from Parquet](https://discourse.julialang.org/t/how-to-use-a-function-to-retrieve-a-single-row-of-data-from-parquet/57356)

<div class="topic-metadata">

**Author:** [@oo92](https://discourse.julialang.org/u/oo92)\
**Replies:** 3\
**Last updated:** [March 17, 2021, 11:02am UTC](https://discourse.julialang.org/t/how-to-use-a-function-to-retrieve-a-single-row-of-data-from-parquet/57356 "2021-03-17T11:02:51Z")

</div>

Hi. I have a dataframe like this: I want to be able to get the numerical data for a single row, say, “Algeria”. This is the function that I wrote for that. function get\_country\_data(country) data\_by\_country |\> da…

---

## [Question about Interval Root finding](https://discourse.julialang.org/t/question-about-interval-root-finding/57124)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 7\
**Last updated:** [March 17, 2021, 8:17am UTC](https://discourse.julialang.org/t/question-about-interval-root-finding/57124 "2021-03-17T08:17:01Z")

</div>

So I am using IntervalRootFinding.jl to find out how many possibly energy states exist for a finite potential well (Quantum mechanichs). The problem is that when I look for roots from -1e100 to 1e100, I get 2 solutions, …

---

## [POLICY: feedback discussion splitting](https://discourse.julialang.org/t/policy-feedback-discussion-splitting/57362)

<div class="topic-metadata">

**Author:** [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Replies:** 0\
**Last updated:** [March 17, 2021, 7:02am UTC](https://discourse.julialang.org/t/policy-feedback-discussion-splitting/57362 "2021-03-17T07:02:50Z")

</div>

We’re introducing a “feedback discussion splitting” policy on this forum. What this means is that while it’s totally ok for people to leave feedback on a broad set of subjects in a single message, rather than continuing …

---

## [Plots.jl: arrows style in quiver()?](https://discourse.julialang.org/t/plots-jl-arrows-style-in-quiver/13659)

<div class="topic-metadata">

**Author:** [@wrgr](https://discourse.julialang.org/u/wrgr)\
**Replies:** 7\
**Last updated:** [March 17, 2021, 7:08am UTC](https://discourse.julialang.org/t/plots-jl-arrows-style-in-quiver/13659 "2021-03-17T07:08:08Z")

</div>

In Plots.jl, quiver(x, y, gradient=(u, v), ...) produces arrows with head sizes being independent of gradient magnitude, like this: The vector in the bottom-left corner has a small norm, and its head looks dispropor…

---

## [What's the big deal? 0 vs 1 based indexing](https://discourse.julialang.org/t/whats-the-big-deal-0-vs-1-based-indexing/1102)

<div class="topic-metadata">

**Author:** [@pyrex41](https://discourse.julialang.org/u/pyrex41)\
**Replies:** 13\
**Last updated:** [March 17, 2021, 7:04am UTC](https://discourse.julialang.org/t/whats-the-big-deal-0-vs-1-based-indexing/1102 "2021-03-17T07:04:13Z")

</div>

As an engineer coming from a non CS / EE background, I have no strong preference or use for 0 based indexing. In fact, 1 based indexing seems incredibly intuitive to me when I use Julia to work with data and manipulate a…

---

## [How to debug "Local instance of remote reference not found"?](https://discourse.julialang.org/t/how-to-debug-local-instance-of-remote-reference-not-found/57359)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [March 17, 2021, 4:29am UTC](https://discourse.julialang.org/t/how-to-debug-local-instance-of-remote-reference-not-found/57359 "2021-03-17T04:29:47Z")

</div>

I tried to make a self-contained MWE but can’t replicate the error. For some reason it doesn’t like the @sync: @sync @distributed for d in 1:ndocs thetaLoop!(Theta,Achain,J,d,n\_burn,Alpha,verbose,nchains,st…

---

## [Passing objective function into JuMP](https://discourse.julialang.org/t/passing-objective-function-into-jump/57357)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 1\
**Last updated:** [March 17, 2021, 4:29am UTC](https://discourse.julialang.org/t/passing-objective-function-into-jump/57357 "2021-03-17T04:29:19Z")

</div>

I would like to use JuMP for nonlinear constrained optimization. Specifically I want to be able to pass my objective function into it from outside. How do I do that? What I tried is below. I am not sure if this is a JuM…

---

## [GeometricFlux.jl - Is there a true variable graph layer?](https://discourse.julialang.org/t/geometricflux-jl-is-there-a-true-variable-graph-layer/57225)

<div class="topic-metadata">

**Author:** [@emsal](https://discourse.julialang.org/u/emsal)\
**Replies:** 5\
**Last updated:** [March 17, 2021, 2:59am UTC](https://discourse.julialang.org/t/geometricflux-jl-is-there-a-true-variable-graph-layer/57225 "2021-03-17T02:59:40Z")

</div>

I’m looking into using https://github.com/yuehhua/GeometricFlux.jl. I notice that as per docs page https://yuehhua.github.io/GeometricFlux.jl/dev/basics/passgraph/, to pass a variable graph you need to define the GCNConv …

---

## [Import already existing JL file in Pluto?](https://discourse.julialang.org/t/import-already-existing-jl-file-in-pluto/44484)

<div class="topic-metadata">

**Author:** [@jdad](https://discourse.julialang.org/u/jdad)\
**Replies:** 21\
**Last updated:** [March 16, 2021, 11:07pm UTC](https://discourse.julialang.org/t/import-already-existing-jl-file-in-pluto/44484 "2021-03-16T23:07:25Z")

</div>

Dear All, Pluto expert users and/or developers, I wonder is there would be an easy way to import and existing Julia (.jl) file into Pluto, without having to manually create new cells and do cut and paste (with begin end …

---

## [Advice / options for filtering output of long-running search procedure](https://discourse.julialang.org/t/advice-options-for-filtering-output-of-long-running-search-procedure/57299)

<div class="topic-metadata">

**Author:** [@healyp](https://discourse.julialang.org/u/healyp)\
**Replies:** 4\
**Last updated:** [March 16, 2021, 10:08pm UTC](https://discourse.julialang.org/t/advice-options-for-filtering-output-of-long-running-search-procedure/57299 "2021-03-16T22:08:39Z")

</div>

I have an exhaustive search procedure that runs for a long time and will generate multiple positive instances. I would like to filter its output and finally print the results. Inspired by the classical UNIX pipeline so…

---

## [Show the full error stacktrace in REPL and pipe it to a file?](https://discourse.julialang.org/t/show-the-full-error-stacktrace-in-repl-and-pipe-it-to-a-file/57339)

<div class="topic-metadata">

**Author:** [@kimlaberinto](https://discourse.julialang.org/u/kimlaberinto)\
**Replies:** 0\
**Last updated:** [March 16, 2021, 9:14pm UTC](https://discourse.julialang.org/t/show-the-full-error-stacktrace-in-repl-and-pipe-it-to-a-file/57339 "2021-03-16T21:14:44Z")

</div>

Once an error occurs and the REPL shows the error and the stacktrace, is there a good way to record it and pipe/record it to a file just from the REPL? julia\> myFunction() ERROR: Error in module. Stacktrace: \[1\] myModu…

---

## [Invalid Gurobi license](https://discourse.julialang.org/t/invalid-gurobi-license/57324)

<div class="topic-metadata">

**Author:** [@Yaropro14](https://discourse.julialang.org/u/Yaropro14)\
**Replies:** 2\
**Last updated:** [March 16, 2021, 8:32pm UTC](https://discourse.julialang.org/t/invalid-gurobi-license/57324 "2021-03-16T20:32:13Z")

</div>

After ENV\[“GRB\_LICENSE\_FILE”\] = “/Library/gurobi911” ENV\[“GUROBI\_HOME”\] = “/Library/gurobi911/mac64/” import Pkg Pkg.rm(“Gurobi”) Pkg.add(“Gurobi”) Pkg.build(“Gurobi”) using Gurobi const GUROBI\_ENV = Gurobi.Env() …

---

## [Derivative for a set of ... points](https://discourse.julialang.org/t/derivative-for-a-set-of-points/57286)

<div class="topic-metadata">

**Author:** [@Frederic\_Gilt](https://discourse.julialang.org/u/Frederic_Gilt)\
**Replies:** 5\
**Last updated:** [March 16, 2021, 5:17pm UTC](https://discourse.julialang.org/t/derivative-for-a-set-of-points/57286 "2021-03-16T17:17:33Z")

</div>

Dear all, I am successfully playing with sol = solve(ensembleprob,SRIW1(),EnsembleThreads(),trajectories=ϕ,saveat=δt); which generates a nice set of values. Among those values sol\[1,:,:\]; is a position, sol\[2,:,:\]; a …

---

## [ModelingToolkit.jl cryptic error](https://discourse.julialang.org/t/modelingtoolkit-jl-cryptic-error/57308)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 3\
**Last updated:** [March 16, 2021, 7:38pm UTC](https://discourse.julialang.org/t/modelingtoolkit-jl-cryptic-error/57308 "2021-03-16T19:38:35Z")

</div>

I was trying to model a thermo-fluid system with ModelingToolkit.jl, however I encountered this: julia\> prob = ODAEProblem(sys, Pair\[\], (0.0, 10.0)) ERROR: AssertionError: !(isalgvar(s, var)) What does it mean? Th…

---

## [How do I fix incremental compilation warning?](https://discourse.julialang.org/t/how-do-i-fix-incremental-compilation-warning/57327)

<div class="topic-metadata">

**Author:** [@asyrov](https://discourse.julialang.org/u/asyrov)\
**Replies:** 0\
**Last updated:** [March 16, 2021, 7:02pm UTC](https://discourse.julialang.org/t/how-do-i-fix-incremental-compilation-warning/57327 "2021-03-16T19:02:44Z")

</div>

How do I fix the following incremental compilation issue (or is it OK)? WARNING: Method definition latex(IO, Markdown.LaTeX) in module Markdown at ...v1.5/Markdown/src/IPython/IPython.jl:28 overwritten in module .../W…

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

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