# Latest

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

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

**Page:** 1416

---

## [PDE Errors](https://discourse.julialang.org/t/pde-errors/59707)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 6\
**Last updated:** [April 22, 2021, 4:36pm UTC](https://discourse.julialang.org/t/pde-errors/59707 "2021-04-22T16:36:34Z")

</div>

I am trying to reproduce this solution to a PDE (Mathematica code located beneath tweet). https://twitter.com/matthen2/status/1378820454589292550?s=21 This is my attempt thus far. Note that with my domains I actually h…

---

## [DualNumbers example doesn't work on GPU](https://discourse.julialang.org/t/dualnumbers-example-doesnt-work-on-gpu/59726)

<div class="topic-metadata">

**Author:** [@gil](https://discourse.julialang.org/u/gil)\
**Replies:** 2\
**Last updated:** [April 22, 2021, 3:59pm UTC](https://discourse.julialang.org/t/dualnumbers-example-doesnt-work-on-gpu/59726 "2021-04-22T15:59:16Z")

</div>

Trying to replicate Tim Besard’s (@maleadt) example from his talk from 2019 ‘Just compile it’. using DualNumbers f(x) = 3x^2 + 5x + 2 wrt(x) = Dual(x, typeof(x)(1)) a = a = wrt.(a) f.(2 .\* a .- 3) works when: a =…

---

## [Is there an easy way to convert all data in DataFrame (or Matrix) to INT?](https://discourse.julialang.org/t/is-there-an-easy-way-to-convert-all-data-in-dataframe-or-matrix-to-int/59804)

<div class="topic-metadata">

**Author:** [@Igor\_Douven](https://discourse.julialang.org/u/Igor_Douven)\
**Replies:** 5\
**Last updated:** [April 22, 2021, 3:58pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-convert-all-data-in-dataframe-or-matrix-to-int/59804 "2021-04-22T15:58:54Z")

</div>

Hi all, I’m trying to import a .csv file with missing values (just blanks, in the file). I’m using CSV.jl together with DataFrames.jl for this. I notice that the columns containing a missing value are all of type String …

---

## [Basic question about memory allocation](https://discourse.julialang.org/t/basic-question-about-memory-allocation/59791)

<div class="topic-metadata">

**Author:** [@pg261](https://discourse.julialang.org/u/pg261)\
**Replies:** 12\
**Last updated:** [April 22, 2021, 2:53pm UTC](https://discourse.julialang.org/t/basic-question-about-memory-allocation/59791 "2021-04-22T14:53:24Z")

</div>

Hi there, I’m very new to Julia. I’m not even sure this is the right place for asking my question. Let me know if it isn’t! (Btw if I have further questions that relate to Jupyter or Pluto, should I ask them elsewhere?) …

---

## [Allocations when splatting Triangle points](https://discourse.julialang.org/t/allocations-when-splatting-triangle-points/59792)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 3\
**Last updated:** [April 22, 2021, 2:32pm UTC](https://discourse.julialang.org/t/allocations-when-splatting-triangle-points/59792 "2021-04-22T14:32:06Z")

</div>

I’m (finally) adding some distance functions to GeometryBasics.jl and I’m having a problem avoiding allocations when splatting to get the points of a triangle using GeometryBasics using BenchmarkTools vect\_to\_center(p,a…

---

## [Why does this vector shows elements multiple times?](https://discourse.julialang.org/t/why-does-this-vector-shows-elements-multiple-times/59807)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 2\
**Last updated:** [April 22, 2021, 2:27pm UTC](https://discourse.julialang.org/t/why-does-this-vector-shows-elements-multiple-times/59807 "2021-04-22T14:27:34Z")

</div>

Hi, Is it normal that show has this behavior or I should report a bug ? julia\> struct Foo x end julia\> Base.show(io::IO, f::Foo) = print("Foo",f.x) julia\> foos = \[Foo(1)\] 1-element Vector{Foo}: Foo1 Foo1…

---

## [Rasterizing feature data](https://discourse.julialang.org/t/rasterizing-feature-data/59594)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 17\
**Last updated:** [April 22, 2021, 12:27pm UTC](https://discourse.julialang.org/t/rasterizing-feature-data/59594 "2021-04-22T12:27:18Z")

</div>

I have a set of WKT strings that I would like to convert into 256x256 raster images (masks, really). I read them into geometries (specifically, multipolygons) just fine with ArchGDAL.fomWKT, but ArchGDAL.unsafe\_rasterize …

---

## [Providing Objective, Gradient and Hessian to the Ipopt wrapper using a single function?](https://discourse.julialang.org/t/providing-objective-gradient-and-hessian-to-the-ipopt-wrapper-using-a-single-function/59675)

<div class="topic-metadata">

**Author:** [@dadada\_dadada](https://discourse.julialang.org/u/dadada_dadada)\
**Replies:** 12\
**Last updated:** [April 22, 2021, 1:30pm UTC](https://discourse.julialang.org/t/providing-objective-gradient-and-hessian-to-the-ipopt-wrapper-using-a-single-function/59675 "2021-04-22T13:30:23Z")

</div>

Hello, I want to provide analytic expressions for the objective function, the gradient and the Hessian of the problem using a single function instead of three different functions. I am using Ipopt via the C wrapper in h…

---

## [Annotation to figure with 2 Subplots](https://discourse.julialang.org/t/annotation-to-figure-with-2-subplots/59734)

<div class="topic-metadata">

**Author:** [@hardy](https://discourse.julialang.org/u/hardy)\
**Replies:** 3\
**Last updated:** [April 22, 2021, 1:18pm UTC](https://discourse.julialang.org/t/annotation-to-figure-with-2-subplots/59734 "2021-04-22T13:18:20Z")

</div>

Hello, I try to make a Plot with 2 Subplots and use the gr() backend. The first (p1) is a 3D surface plot and the 2. (p2) a 2D contour plot. The axis of both subplots are also different. I tried to put the annotation in…

---

## [Nested vector variables in ODE problem definitions](https://discourse.julialang.org/t/nested-vector-variables-in-ode-problem-definitions/33417)

<div class="topic-metadata">

**Author:** [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Replies:** 6\
**Last updated:** [April 22, 2021, 1:05pm UTC](https://discourse.julialang.org/t/nested-vector-variables-in-ode-problem-definitions/33417 "2021-04-22T13:05:32Z")

</div>

I am trying to define an ODE in which the state variables are nested in arrays. Here is a toy example: using DifferentialEquations function f!(du, u, p, t) du\[1\] = u\[1\] - u\[2\]\[1\] du\[2\] .= -5 \* u\[2\] return n…

---

## [Error in Pkg EEG](https://discourse.julialang.org/t/error-in-pkg-eeg/59799)

<div class="topic-metadata">

**Author:** [@Xzarx](https://discourse.julialang.org/u/Xzarx)\
**Replies:** 4\
**Last updated:** [April 22, 2021, 12:55pm UTC](https://discourse.julialang.org/t/error-in-pkg-eeg/59799 "2021-04-22T12:55:48Z")

</div>

I tries to use the package EGG, but, when I run the command: Pkg.add(“EEG”) (@v1.5) pkg\> Pkg.checkout(“EEG”) ERROR: Could not determine command julia\> Pkg.checkout(“EEG”) ERROR: UndefVarError: checkout not defined S…

---

## [Can I 'force' a specific method to be called?](https://discourse.julialang.org/t/can-i-force-a-specific-method-to-be-called/59800)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 1\
**Last updated:** [April 22, 2021, 12:28pm UTC](https://discourse.julialang.org/t/can-i-force-a-specific-method-to-be-called/59800 "2021-04-22T12:28:36Z")

</div>

Hi, Consider the following: abstract type FooBase end bar(f::FooBase) = 1 struct Foo \<: FooBase counter::Integer end function bar(f::Foo) f.counter += bar(f) # I want to call bar(f::FooBase) here end Can I somehow …

---

## [Distributed+PyCall: cannot see exceptions ("cannot pickle 'traceback' object")](https://discourse.julialang.org/t/distributed-pycall-cannot-see-exceptions-cannot-pickle-traceback-object/59802)

<div class="topic-metadata">

**Author:** [@dapz](https://discourse.julialang.org/u/dapz)\
**Replies:** 0\
**Last updated:** [April 22, 2021, 12:26pm UTC](https://discourse.julialang.org/t/distributed-pycall-cannot-see-exceptions-cannot-pickle-traceback-object/59802 "2021-04-22T12:26:41Z")

</div>

Hi, could someone tell me if the error which appears in the output below is a bug or if it should be expected for some reason? Even if it is not possible to convert the stacktrace for some reason, is there some workaroun…

---

## [An example of Apache Arrow file?](https://discourse.julialang.org/t/an-example-of-apache-arrow-file/58299)

<div class="topic-metadata">

**Author:** [@Sami](https://discourse.julialang.org/u/Sami)\
**Replies:** 7\
**Last updated:** [April 22, 2021, 11:56am UTC](https://discourse.julialang.org/t/an-example-of-apache-arrow-file/58299 "2021-04-22T11:56:53Z")

</div>

Hello, I would like to test Julia’s support for Apache Arrow with a big file that doesn’t fit to memory (RAM). I can’t find any example of such file, could you help me with this please? I guess I need a file that is in…

---

## [Changing a DataFrame entry using "chop"](https://discourse.julialang.org/t/changing-a-dataframe-entry-using-chop/59796)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 1\
**Last updated:** [April 22, 2021, 11:56am UTC](https://discourse.julialang.org/t/changing-a-dataframe-entry-using-chop/59796 "2021-04-22T11:56:32Z")

</div>

A column in my DataFrame contains Strings that must be cleaned. I was hoping the following method would work, but it does not. What would work? df\[i,3\] = chop(df1\[i,3\], head = 10, tail = 0) I get the error “setindex! n…

---

## [Going backward in random number generation](https://discourse.julialang.org/t/going-backward-in-random-number-generation/24257)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 17\
**Last updated:** [April 22, 2021, 11:49am UTC](https://discourse.julialang.org/t/going-backward-in-random-number-generation/24257 "2021-04-22T11:49:34Z")

</div>

Hi, I have a function sample() that generate trajectories from random numbers. Before calling this function, I would do Random.seed!(1) My problem is that I call rand() one more time than necessary in sample() given t…

---

## [OLS with collinearity and weights using GLM.jl](https://discourse.julialang.org/t/ols-with-collinearity-and-weights-using-glm-jl/59787)

<div class="topic-metadata">

**Author:** [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Replies:** 3\
**Last updated:** [April 22, 2021, 11:49am UTC](https://discourse.julialang.org/t/ols-with-collinearity-and-weights-using-glm-jl/59787 "2021-04-22T11:49:26Z")

</div>

I am having a problem fitting an OLS model with weights and collinearity using GLM.jl. Here is a simple example y = rand(10) x = rand(10, 2) x = hcat(x,x) lm(x,y) # correctly removes last two columns lm(x, y, wts = one…

---

## [Changing content of an array via a function](https://discourse.julialang.org/t/changing-content-of-an-array-via-a-function/59771)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 2\
**Last updated:** [April 22, 2021, 11:30am UTC](https://discourse.julialang.org/t/changing-content-of-an-array-via-a-function/59771 "2021-04-22T11:30:09Z")

</div>

Dear All, I am trying to assign values to an array via an index shifting function for a particular reason, I was wondering if there is a way to achieve that in Julia. A simple example is a = \[1 2 3\] b = \[0 0 0\] # I wan…

---

## [Annotations not showing on log scale](https://discourse.julialang.org/t/annotations-not-showing-on-log-scale/59767)

<div class="topic-metadata">

**Author:** [@AshtonSBradley](https://discourse.julialang.org/u/AshtonSBradley)\
**Replies:** 3\
**Last updated:** [April 22, 2021, 11:07am UTC](https://discourse.julialang.org/t/annotations-not-showing-on-log-scale/59767 "2021-04-22T11:07:38Z")

</div>

When I do fig = Figure() at = Axis(fig\[1,1\],yscale=log10,xscale=log10) lines!(at,1..10,exp) annotations!(at,\["testing"\],\[Point2f0(2,100)\]) fig the annotation doesn’t show up: What am I doing wrong? (seems to work o…

---

## [Communicate with external process through pipe](https://discourse.julialang.org/t/communicate-with-external-process-through-pipe/59759)

<div class="topic-metadata">

**Author:** [@lambdakappatheta](https://discourse.julialang.org/u/lambdakappatheta)\
**Replies:** 2\
**Last updated:** [April 22, 2021, 10:54am UTC](https://discourse.julialang.org/t/communicate-with-external-process-through-pipe/59759 "2021-04-22T10:54:28Z")

</div>

I am trying to create a pipe (a pair of file descriptors), find the file descriptor number of the writing end of the pipe, pass it to an external command and read from the reading end of the pipe from my Julia script. In…

---

## [Social Simulation Conference 2021](https://discourse.julialang.org/t/social-simulation-conference-2021/56979)

<div class="topic-metadata">

**Author:** [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Replies:** 4\
**Last updated:** [April 22, 2021, 10:20am UTC](https://discourse.julialang.org/t/social-simulation-conference-2021/56979 "2021-04-22T10:20:01Z")

</div>

Dear Colleague(s), SSC 2021 is the 16th annual Social Simulation Conference and will take place from 20th to 24th September 2021 at the Cracow University of Economics, Poland. The conference is one of the key activities…

---

## [Importing CairoMakie prevents sampling](https://discourse.julialang.org/t/importing-cairomakie-prevents-sampling/59501)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 7\
**Last updated:** [April 22, 2021, 8:47am UTC](https://discourse.julialang.org/t/importing-cairomakie-prevents-sampling/59501 "2021-04-22T08:47:42Z")

</div>

I have a script that runs fine unless I have import CairoMakie at the top. Then it hangs. How can I diagnose this? It hangs at mcmc\_with\_warmup. The same thing happens whether I have using CairoMakie or import CairoMaki…

---

## [Colour plot points based on another vector](https://discourse.julialang.org/t/colour-plot-points-based-on-another-vector/59776)

<div class="topic-metadata">

**Author:** [@SDA](https://discourse.julialang.org/u/SDA)\
**Replies:** 3\
**Last updated:** [April 22, 2021, 7:56am UTC](https://discourse.julialang.org/t/colour-plot-points-based-on-another-vector/59776 "2021-04-22T07:56:57Z")

</div>

Hi everyone, I am trying to amend the example given here: https://discourse.julialang.org/t/plot-a-vector-of-arrays/54956, which plots a vector of arrays. The example I am working with is a 3D plot but hopefully the 2D…

---

## [Troubles with solving Korteweg-de Vries equation](https://discourse.julialang.org/t/troubles-with-solving-korteweg-de-vries-equation/59406)

<div class="topic-metadata">

**Author:** [@Stepan\_Shcherbinin](https://discourse.julialang.org/u/Stepan_Shcherbinin)\
**Replies:** 1\
**Last updated:** [April 22, 2021, 7:40am UTC](https://discourse.julialang.org/t/troubles-with-solving-korteweg-de-vries-equation/59406 "2021-04-22T07:40:14Z")

</div>

Hi everybody, I am a new Julia user. I try to solve KdV equation with the aid of DifferentialEquations.jl. Here is my code: using DifferentialEquations, DiffEqOperators using Plots a = 1 u\_analytic(x) = 3\*a\*a/cosh(a\*0…

---

## [DiffEqFlux.sciml\_train fails with save\_idxs keyword](https://discourse.julialang.org/t/diffeqflux-sciml-train-fails-with-save-idxs-keyword/56864)

<div class="topic-metadata">

**Author:** [@moesphere](https://discourse.julialang.org/u/moesphere)\
**Replies:** 3\
**Last updated:** [April 22, 2021, 7:39am UTC](https://discourse.julialang.org/t/diffeqflux-sciml-train-fails-with-save-idxs-keyword/56864 "2021-04-22T07:39:05Z")

</div>

Training via DiffEqFlux fails when save\_idxs keyword is used within the loss function. Differentiation seems to be the problem. Evaluation of the loss function works fine. MWE is taken from the docs using DifferentialE…

---

## [Time-period-based time series moving windows in Julia?](https://discourse.julialang.org/t/time-period-based-time-series-moving-windows-in-julia/59745)

<div class="topic-metadata">

**Author:** [@luke](https://discourse.julialang.org/u/luke)\
**Replies:** 5\
**Last updated:** [April 22, 2021, 7:21am UTC](https://discourse.julialang.org/t/time-period-based-time-series-moving-windows-in-julia/59745 "2021-04-22T07:21:06Z")

</div>

Looking at windowing in TimeSeries.jl, which seems to be the main package for time series data in Julia, I can’t find anything equivalent to the native time-period-based windowing offered in Pandas, which supports window…

---

## [How to avoid repeating code between back-, middle-, and front-ends?](https://discourse.julialang.org/t/how-to-avoid-repeating-code-between-back-middle-and-front-ends/59697)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 5\
**Last updated:** [April 22, 2021, 7:17am UTC](https://discourse.julialang.org/t/how-to-avoid-repeating-code-between-back-middle-and-front-ends/59697 "2021-04-22T07:17:42Z")

</div>

When building a full-stack app, I find it frustrating to define basically 3 nearly identical types: What I consider the main struct: defining the logic of the type disregarding any GUI/DB needs. This is the struct you’…

---

## [Changing line weight and font in PlotlyJS](https://discourse.julialang.org/t/changing-line-weight-and-font-in-plotlyjs/59677)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 7\
**Last updated:** [April 22, 2021, 7:16am UTC](https://discourse.julialang.org/t/changing-line-weight-and-font-in-plotlyjs/59677 "2021-04-22T07:16:40Z")

</div>

Thanks for reading and please see below for a MWE parcoords() with the Plotly backend. This MWE generates no errors. background I just need a parallel coordinates plot. In general, I prefer the gr() or pyplot() backen…

---

## [UndefVarError with nested function passed to @cfunction](https://discourse.julialang.org/t/undefvarerror-with-nested-function-passed-to-cfunction/59741)

<div class="topic-metadata">

**Author:** [@psanan](https://discourse.julialang.org/u/psanan)\
**Replies:** 1\
**Last updated:** [April 22, 2021, 2:03am UTC](https://discourse.julialang.org/t/undefvarerror-with-nested-function-passed-to-cfunction/59741 "2021-04-22T02:03:42Z")

</div>

I’m working on a project that involves wrapping Julia functions to be used as callbacks for a C library. I don’t understand the error when I run this, but I’m new enough to Julia to be confused about whether I should exp…

---

## [Julia vs SciPy - Performance comparison and benchmark help](https://discourse.julialang.org/t/julia-vs-scipy-performance-comparison-and-benchmark-help/59758)

<div class="topic-metadata">

**Author:** [@miguelraz](https://discourse.julialang.org/u/miguelraz)\
**Replies:** 15\
**Last updated:** [April 22, 2021, 6:35am UTC](https://discourse.julialang.org/t/julia-vs-scipy-performance-comparison-and-benchmark-help/59758 "2021-04-22T06:35:10Z")

</div>

Hello all! I’m dusting off a one-function package I made a while ago, but I want to confirm that the benchmarks are honest. There’s some calls to scipy objects, and I would like to know if I’m measuring any sort of unfa…

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

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