# Latest

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

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

**Page:** 933

---

## [PyPlot plots to figure window from IJulia. Why is this happening?](https://discourse.julialang.org/t/pyplot-plots-to-figure-window-from-ijulia-why-is-this-happening/86851)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 2\
**Last updated:** [September 6, 2022, 7:42pm UTC](https://discourse.julialang.org/t/pyplot-plots-to-figure-window-from-ijulia-why-is-this-happening/86851 "2022-09-06T19:42:40Z")

</div>

Running v1.8.0 on an M2 macbook air. When I fire up a notebook and use PyPlot to make a plot, the figure appears in a figure window, not as part of the notebook. I have tried rebuilding my environment from scratch and …

---

## [ErrorsInVariables.jl: Reducing errors-in-variables bias in linear regression](https://discourse.julialang.org/t/errorsinvariables-jl-reducing-errors-in-variables-bias-in-linear-regression/86853)

<div class="topic-metadata">

**Author:** [@jbytecode](https://discourse.julialang.org/u/jbytecode)\
**Replies:** 0\
**Last updated:** [September 6, 2022, 7:22pm UTC](https://discourse.julialang.org/t/errorsinvariables-jl-reducing-errors-in-variables-bias-in-linear-regression/86853 "2022-09-06T19:22:59Z")

</div>

I am happy to announce that my Julia package ErrorsInVariables is now available in Julia package repository and ready to install. The package is the Julia implementation of our published algorithm and the R package eive.…

---

## [JuMP element wise \`latex\_formulation\`](https://discourse.julialang.org/t/jump-element-wise-latex-formulation/86842)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 3\
**Last updated:** [September 6, 2022, 7:22pm UTC](https://discourse.julialang.org/t/jump-element-wise-latex-formulation/86842 "2022-09-06T19:22:18Z")

</div>

I have some large JuMP models which I’d like to convert to latex, however, this quickly becomes impractical. Given a model using JuMP model = Model() @variable(model, x\[1:10\]) @constraint(model, x\_min, x .≤ 10) @cons…

---

## [Julia Int function](https://discourse.julialang.org/t/julia-int-function/86852)

<div class="topic-metadata">

**Author:** [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Replies:** 2\
**Last updated:** [September 6, 2022, 6:36pm UTC](https://discourse.julialang.org/t/julia-int-function/86852 "2022-09-06T18:36:28Z")

</div>

Are there any major changes for the Int function? This below script worked in previous versions. Now I’m getting lots of errors for the latest version of Julia: Cruise = Int.(TT\[:,1\]), I’m currently on Version 1.7.…

---

## [Anyone working on Apache Sketches for Julia?](https://discourse.julialang.org/t/anyone-working-on-apache-sketches-for-julia/86847)

<div class="topic-metadata">

**Author:** [@vargasje](https://discourse.julialang.org/u/vargasje)\
**Replies:** 0\
**Last updated:** [September 6, 2022, 5:01pm UTC](https://discourse.julialang.org/t/anyone-working-on-apache-sketches-for-julia/86847 "2022-09-06T17:01:30Z")

</div>

Anyone working on Apache Sketches for Julia? The link to the Apache site is below: https://datasketches.apache.org/

---

## [Fixing missing marker in plot legend when first value in series is NaN](https://discourse.julialang.org/t/fixing-missing-marker-in-plot-legend-when-first-value-in-series-is-nan/86658)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 2\
**Last updated:** [September 6, 2022, 4:45pm UTC](https://discourse.julialang.org/t/fixing-missing-marker-in-plot-legend-when-first-value-in-series-is-nan/86658 "2022-09-06T16:45:56Z")

</div>

When using the GR backend for Plots.jl, I noticed that for a series with a marker, the marker will not show up in the legend of a plot if the first entry in the series is NaN. MWE: using Plots; gr() plot(\[NaN,2,3\], mar…

---

## [Organizing package with both gpu- and cpu implemntations](https://discourse.julialang.org/t/organizing-package-with-both-gpu-and-cpu-implemntations/86846)

<div class="topic-metadata">

**Author:** [@ykkan](https://discourse.julialang.org/u/ykkan)\
**Replies:** 0\
**Last updated:** [September 6, 2022, 4:21pm UTC](https://discourse.julialang.org/t/organizing-package-with-both-gpu-and-cpu-implemntations/86846 "2022-09-06T16:21:19Z")

</div>

Hi everyone, I am trying to develop a package which provides both gpu-parallelized implementation and cpu-parallelized implementation. How should I organize the project directory? In particular, how should I manage the …

---

## [Registering a package hosted on a public self-hosted gitlab instance](https://discourse.julialang.org/t/registering-a-package-hosted-on-a-public-self-hosted-gitlab-instance/43479)

<div class="topic-metadata">

**Author:** [@dapz](https://discourse.julialang.org/u/dapz)\
**Replies:** 13\
**Last updated:** [September 6, 2022, 3:53pm UTC](https://discourse.julialang.org/t/registering-a-package-hosted-on-a-public-self-hosted-gitlab-instance/43479 "2022-09-06T15:53:24Z")

</div>

I am just looking at the registration process (I have never done it before), and I am not sure to fully understand everything. Is there a way to register on the General repository a (publicly available) package hosted on…

---

## [Using atomic operations in Julia 1.6](https://discourse.julialang.org/t/using-atomic-operations-in-julia-1-6/86812)

<div class="topic-metadata">

**Author:** [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Replies:** 10\
**Last updated:** [September 6, 2022, 3:28pm UTC](https://discourse.julialang.org/t/using-atomic-operations-in-julia-1-6/86812 "2022-09-06T15:28:09Z")

</div>

I’d like to implement the following pattern: mutable struct A @atomic x::Int end a = A(3) @atomic a.x = 4 # in a multithreaded environment However, I don’t want to drop compatibility with Julia 1.6 and it seems th…

---

## [Sum of columns in julia dataframe and appen it as last element in the respective columns](https://discourse.julialang.org/t/sum-of-columns-in-julia-dataframe-and-appen-it-as-last-element-in-the-respective-columns/86837)

<div class="topic-metadata">

**Author:** [@ayodyas](https://discourse.julialang.org/u/ayodyas)\
**Replies:** 3\
**Last updated:** [September 6, 2022, 2:17pm UTC](https://discourse.julialang.org/t/sum-of-columns-in-julia-dataframe-and-appen-it-as-last-element-in-the-respective-columns/86837 "2022-09-06T14:17:33Z")

</div>

I have a dataframe df, using DataFrames df=DataFrame(p1 = \[1, 2, 3, 4, 5\],p2 = \[10,20,30,40,50\],p3 = \[5,5,10,20,20\]) I wanted to calculate the sum of specific columns (p1 and p2) and append it as the last row in respec…

---

## [Nightly Julia crashes Code Julia extension](https://discourse.julialang.org/t/nightly-julia-crashes-code-julia-extension/86838)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [September 6, 2022, 1:59pm UTC](https://discourse.julialang.org/t/nightly-julia-crashes-code-julia-extension/86838 "2022-09-06T13:59:46Z")

</div>

It seems that Code and the extension work fine with Julia 1.8.0, but the extension crashes before it loads with nightly Julia. Are the extension devs interested in bug reports for nightly Julia?

---

## [Compiling AST's](https://discourse.julialang.org/t/compiling-asts/86834)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 1\
**Last updated:** [September 6, 2022, 11:47am UTC](https://discourse.julialang.org/t/compiling-asts/86834 "2022-09-06T11:47:33Z")

</div>

I not infrequently find myself building up AST’s representing a function definition and wishing to compile them. I end up using eval which seems a bit too non-specific for this purpose. I think it would be useful to ha…

---

## [InveniaLabs Julia User's Networking Event (Cambridge, UK)](https://discourse.julialang.org/t/invenialabs-julia-users-networking-event-cambridge-uk/86557)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 1\
**Last updated:** [September 6, 2022, 11:39am UTC](https://discourse.julialang.org/t/invenialabs-julia-users-networking-event-cambridge-uk/86557 "2022-09-06T11:39:26Z")

</div>

Hi all, some folk at the JuliaCon satellite in London heard about this. On the 14th of September 2022, at 5:30pm running til late, Invenia is hosting a party for Julia users. We couldn’t throw a sweet party at JuliaC…

---

## [Overriding (some?) key bindings in REPL does not seem to work](https://discourse.julialang.org/t/overriding-some-key-bindings-in-repl-does-not-seem-to-work/86830)

<div class="topic-metadata">

**Author:** [@HanD](https://discourse.julialang.org/u/HanD)\
**Replies:** 5\
**Last updated:** [September 6, 2022, 11:38am UTC](https://discourse.julialang.org/t/overriding-some-key-bindings-in-repl-does-not-seem-to-work/86830 "2022-09-06T11:38:33Z")

</div>

Hello! I’m trying to override a default keybinding in REPL, as suggested in the manual, with the following code in startup.jl: import REPL import REPL.LineEdit atreplinit() do repl my\_keys = Dict("^w" =\> (s,o...) …

---

## [Measuring non-idle time spent in process](https://discourse.julialang.org/t/measuring-non-idle-time-spent-in-process/86832)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 1\
**Last updated:** [September 6, 2022, 8:10am UTC](https://discourse.julialang.org/t/measuring-non-idle-time-spent-in-process/86832 "2022-09-06T08:10:49Z")

</div>

Hi all! I want to measure the non-idle time spent in a given process. If I use Julia’s wall clock with time(), other processes that run on my computer (like parallel threads) will change the measurement. Judging by the …

---

## [How to plot step function \[x\]/x Correctly with limit](https://discourse.julialang.org/t/how-to-plot-step-function-x-x-correctly-with-limit/86780)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 6\
**Last updated:** [September 6, 2022, 10:48am UTC](https://discourse.julialang.org/t/how-to-plot-step-function-x-x-correctly-with-limit/86780 "2022-09-06T10:48:02Z")

</div>

Hi all, I see a problem set and I want to plot this one: \\frac{\[x\]}{x} \[x\] is a step function I know the code to create step function (from my old thread), but how to create the above function? using Plots,LaTeXStri…

---

## ['tight\_layout' in Makie for plots with multiple subplots](https://discourse.julialang.org/t/tight-layout-in-makie-for-plots-with-multiple-subplots/86718)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 5\
**Last updated:** [September 6, 2022, 9:55am UTC](https://discourse.julialang.org/t/tight-layout-in-makie-for-plots-with-multiple-subplots/86718 "2022-09-06T09:55:25Z")

</div>

I have the following code: using CairoMakie # create data x = range(-1, 1, 129) y = range(-1, 1, 129) X = ones(length(y)) .\* x' Y = y .\* ones(1,length(x)) R = sqrt.(X.^2 + Y.^2) Z = ((R.^2 .- 1.5) .^ 2) Z\[R.\>1\] .= 0 …

---

## [How to passing vargs... to a function without allocation?](https://discourse.julialang.org/t/how-to-passing-vargs-to-a-function-without-allocation/86824)

<div class="topic-metadata">

**Author:** [@MrBug](https://discourse.julialang.org/u/MrBug)\
**Replies:** 4\
**Last updated:** [September 6, 2022, 9:54am UTC](https://discourse.julialang.org/t/how-to-passing-vargs-to-a-function-without-allocation/86824 "2022-09-06T09:54:05Z")

</div>

I would like to unpack a tuple parameter of a function, then pass it to another function. The naive implementation in the following causes allocations which becomes a bottleneck for my application. Is there any way to r…

---

## [How to save static svg with plotly](https://discourse.julialang.org/t/how-to-save-static-svg-with-plotly/4225)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 16\
**Last updated:** [September 6, 2022, 9:27am UTC](https://discourse.julialang.org/t/how-to-save-static-svg-with-plotly/4225 "2022-09-06T09:27:07Z")

</div>

julia\> using Plots julia\> plotly() Plots.PlotlyBackend() julia\> savefig(plot(1:5,1:5), "/tmp/x.svg") produces a HTML snippet. Is there a way to get a static SVG? Note: I know how to do this for PlotlyJS, but that doe…

---

## [Multilevel DataFrame](https://discourse.julialang.org/t/multilevel-dataframe/86798)

<div class="topic-metadata">

**Author:** [@flobe](https://discourse.julialang.org/u/flobe)\
**Replies:** 8\
**Last updated:** [September 6, 2022, 8:13am UTC](https://discourse.julialang.org/t/multilevel-dataframe/86798 "2022-09-06T08:13:37Z")

</div>

Hi all, probably the question was asked before, but I didn’t find it here in the discourse. Basically, I’m importing multiple tables (.csv) with DataFrames.jl to Julia. In my example, each table represents a robot with…

---

## [Dagger use cases?](https://discourse.julialang.org/t/dagger-use-cases/72012)

<div class="topic-metadata">

**Author:** [@zsz00](https://discourse.julialang.org/u/zsz00)\
**Replies:** 6\
**Last updated:** [September 6, 2022, 8:07am UTC](https://discourse.julialang.org/t/dagger-use-cases/72012 "2022-09-06T08:07:04Z")

</div>

Obviously there are no upper-layer applications . As the user, It can’t be used to solve real problems.

---

## [Can I align all vertical axes in a multi-row faceted plot done with Plots.jl?](https://discourse.julialang.org/t/can-i-align-all-vertical-axes-in-a-multi-row-faceted-plot-done-with-plots-jl/86156)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 7\
**Last updated:** [September 6, 2022, 7:44am UTC](https://discourse.julialang.org/t/can-i-align-all-vertical-axes-in-a-multi-row-faceted-plot-done-with-plots-jl/86156 "2022-09-06T07:44:04Z")

</div>

I tried to do a faceted plot using Plots.jl. The code below does almost everything I wanted, except for one thing: the vertical axes are aligned on each row, but not across rows. The argument link = :y in the last Plot…

---

## [XGBoost Broken for Mac Mojave and earlier - Initialization Error](https://discourse.julialang.org/t/xgboost-broken-for-mac-mojave-and-earlier-initialization-error/86731)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 22\
**Last updated:** [September 6, 2022, 7:32am UTC](https://discourse.julialang.org/t/xgboost-broken-for-mac-mojave-and-earlier-initialization-error/86731 "2022-09-06T07:32:40Z")

</div>

I haven’t used XGBoost in a while. Now when I try to ‘use’ it, I get all sorts of errors, even when I update, and build, etc., even after fresh install of Julia. The difficulty seems to lie with c++ modules… Does anyon…

---

## [CUDA on slices](https://discourse.julialang.org/t/cuda-on-slices/86782)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 5\
**Last updated:** [September 6, 2022, 2:45am UTC](https://discourse.julialang.org/t/cuda-on-slices/86782 "2022-09-06T02:45:33Z")

</div>

Trying to apply a function to slices of a CuArray. Tried broadcasting, mapslices and various Tensor packages. Is there any way to do this? using CUDA, Pipe, Interpolations, TensorCast d = Uniform(1,30) x = Float64.(1…

---

## [\`GC.gc\` thread-safety?](https://discourse.julialang.org/t/gc-gc-thread-safety/86823)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [September 5, 2022, 9:58pm UTC](https://discourse.julialang.org/t/gc-gc-thread-safety/86823 "2022-09-05T21:58:16Z")

</div>

Is calling GC.gc() concurrently from multiple threads allowed? How about GC.gc(false)? I know the GC is stop-the-world, so doing that would diminish parallelism, I just want to know whether it’s correct to do so.

---

## [Error using Kriging surrogate derivative](https://discourse.julialang.org/t/error-using-kriging-surrogate-derivative/86788)

<div class="topic-metadata">

**Author:** [@davide445](https://discourse.julialang.org/u/davide445)\
**Replies:** 2\
**Last updated:** [September 5, 2022, 9:25pm UTC](https://discourse.julialang.org/t/error-using-kriging-surrogate-derivative/86788 "2022-09-05T21:25:31Z")

</div>

Trying to test Surrogates.jl I have created this using Surrogates using Zygote g = x -\> x^2 + 5\*x x1 = sample(40,0,5,SobolSample()) y1 = g.(x1) my\_krig1 = Kriging(x1,y1,0,5;p=0.9) d\_my\_krig1 = x -\> my\_krig1'(x) d\_g = x …

---

## [How to have condition on SimpleWeightedDiGraph function?](https://discourse.julialang.org/t/how-to-have-condition-on-simpleweighteddigraph-function/86735)

<div class="topic-metadata">

**Author:** [@A\_Green\_Leave](https://discourse.julialang.org/u/A_Green_Leave)\
**Replies:** 7\
**Last updated:** [September 5, 2022, 7:43pm UTC](https://discourse.julialang.org/t/how-to-have-condition-on-simpleweighteddigraph-function/86735 "2022-09-05T19:43:10Z")

</div>

Hi Guys According to the documentation the way SimpleWeightedDiGraph works is something like a g = SimpleWeightedDiGraph(heads, tails, weights). If so and if having a three list of requirements: heads = \[ 62, 17, 15, 2…

---

## [Docstring on multiple lines with a module that does not import Core and Base](https://discourse.julialang.org/t/docstring-on-multiple-lines-with-a-module-that-does-not-import-core-and-base/86799)

<div class="topic-metadata">

**Author:** [@uje](https://discourse.julialang.org/u/uje)\
**Replies:** 7\
**Last updated:** [September 5, 2022, 7:33pm UTC](https://discourse.julialang.org/t/docstring-on-multiple-lines-with-a-module-that-does-not-import-core-and-base/86799 "2022-09-05T19:33:59Z")

</div>

I’m working on a module that does not import Core and Base to test a functionality. I’ve tried adding docstrings to the function the naive way, which I call “naive” because it doesn’t allow me the option of dispatching …

---

## [Advice on speeding up highly parallel and I/O intensive code](https://discourse.julialang.org/t/advice-on-speeding-up-highly-parallel-and-i-o-intensive-code/86795)

<div class="topic-metadata">

**Author:** [@snowgum](https://discourse.julialang.org/u/snowgum)\
**Replies:** 4\
**Last updated:** [September 5, 2022, 7:28pm UTC](https://discourse.julialang.org/t/advice-on-speeding-up-highly-parallel-and-i-o-intensive-code/86795 "2022-09-05T19:28:08Z")

</div>

I am solving a problem that is highly parallel, and wondering how to make it as efficient as possible in Julia. I need to run a function (let’s call it do\_work) on 1D slices of 3D arrays written on disk. For example, if …

---

## [How to use Base.rationalize on whole symbolic expression?](https://discourse.julialang.org/t/how-to-use-base-rationalize-on-whole-symbolic-expression/86748)

<div class="topic-metadata">

**Author:** [@Nasser](https://discourse.julialang.org/u/Nasser)\
**Replies:** 7\
**Last updated:** [September 5, 2022, 6:32pm UTC](https://discourse.julialang.org/t/how-to-use-base-rationalize-on-whole-symbolic-expression/86748 "2022-09-05T18:32:06Z")

</div>

fyi, issue opened I obtain a symbolic expression from call to one of Julia symbolic functions (integrate) that has a mix of floating points and integers. I’d like to use Base.rationalize to rationalize these floating…

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

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