# Latest

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

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

**Page:** 1202

---

## [Solving coupled ODE problem with explicit fft terms of the independent variables](https://discourse.julialang.org/t/solving-coupled-ode-problem-with-explicit-fft-terms-of-the-independent-variables/71779)

<div class="topic-metadata">

**Author:** [@Thaegy](https://discourse.julialang.org/u/Thaegy)\
**Replies:** 7\
**Last updated:** [November 19, 2021, 4:55pm UTC](https://discourse.julialang.org/t/solving-coupled-ode-problem-with-explicit-fft-terms-of-the-independent-variables/71779 "2021-11-19T16:55:18Z")

</div>

Hi all, I have been trying to translate my MATLAB code that solves a set of coupled ODEs into Julia. I have only just started using Julia so am still quite unfamiliar with its types and the intricacies of getting some f…

---

## [Distributions.loglikelihood](https://discourse.julialang.org/t/distributions-loglikelihood/71732)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 16\
**Last updated:** [November 19, 2021, 4:38pm UTC](https://discourse.julialang.org/t/distributions-loglikelihood/71732 "2021-11-19T16:38:59Z")

</div>

Can someone please explain Distributions.loglikelihood? A likelihood is a function of the parameters, but here it seems to be just another name for a broadcasted logpdf, a function of the data. Maybe there’s a history be…

---

## [Aliasing with Makie contourf](https://discourse.julialang.org/t/aliasing-with-makie-contourf/71783)

<div class="topic-metadata">

**Author:** [@smillerc](https://discourse.julialang.org/u/smillerc)\
**Replies:** 4\
**Last updated:** [November 19, 2021, 3:33pm UTC](https://discourse.julialang.org/t/aliasing-with-makie-contourf/71783 "2021-11-19T15:33:36Z")

</div>

Is there a way to get rid of the aliasing in the contourf! lines in the following example? using CairoMakie function testcontourf() xs = LinRange(0, 10, 100) ys = LinRange(0, 10, 100) zs = \[cos(x) \* sin(y) …

---

## [NN with a ODE in the loss function](https://discourse.julialang.org/t/nn-with-a-ode-in-the-loss-function/71519)

<div class="topic-metadata">

**Author:** [@gnicolosi](https://discourse.julialang.org/u/gnicolosi)\
**Replies:** 4\
**Last updated:** [November 19, 2021, 3:22pm UTC](https://discourse.julialang.org/t/nn-with-a-ode-in-the-loss-function/71519 "2021-11-19T15:22:57Z")

</div>

Dear all, I’m running a simple NN that can also be understood as a linear regression problem (there are specific reasons I’m posing it as a NN). Instead of a classic least square approach in the loss function, mine has …

---

## [Can't get marginal plot to work](https://discourse.julialang.org/t/cant-get-marginal-plot-to-work/71685)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 7\
**Last updated:** [November 19, 2021, 2:42pm UTC](https://discourse.julialang.org/t/cant-get-marginal-plot-to-work/71685 "2021-11-19T14:42:19Z")

</div>

I’m trying to plot a contour with marginal plots. I’ve created a user recipe: @userplot JPlot @recipe function f(h::JPlot) m, x, y = h.args mx = vec(sum(m, dims=1)) my = vec(sum(m, dims=2)) l…

---

## [Help with modules and types](https://discourse.julialang.org/t/help-with-modules-and-types/71782)

<div class="topic-metadata">

**Author:** [@cesarmarinhorj](https://discourse.julialang.org/u/cesarmarinhorj)\
**Replies:** 5\
**Last updated:** [November 19, 2021, 2:27pm UTC](https://discourse.julialang.org/t/help-with-modules-and-types/71782 "2021-11-19T14:27:01Z")

</div>

I am trying organize a simple module and submodules to learn Julia. I made an HR module, with a submodule, Staff. Inside it, will have a age function, that has a Person as argument. the model in it first worked well w…

---

## [Mpi timing](https://discourse.julialang.org/t/mpi-timing/35953)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 2\
**Last updated:** [November 19, 2021, 12:58pm UTC](https://discourse.julialang.org/t/mpi-timing/35953 "2021-11-19T12:58:01Z")

</div>

Hi, I am learning the MPI.jl package. At some point I thought I understand how JIT works, but maybe not. I may need someone help me clarify some basic concepts regarding the MPI usages and Julia: By executing command…

---

## [Simple linear regresion in Julia? (and a comment on the stability of user interfaces)](https://discourse.julialang.org/t/simple-linear-regresion-in-julia-and-a-comment-on-the-stability-of-user-interfaces/20867)

<div class="topic-metadata">

**Author:** [@pdenapo](https://discourse.julialang.org/u/pdenapo)\
**Replies:** 9\
**Last updated:** [November 19, 2021, 12:02pm UTC](https://discourse.julialang.org/t/simple-linear-regresion-in-julia-and-a-comment-on-the-stability-of-user-interfaces/20867 "2021-11-19T12:02:16Z")

</div>

I have two arrays of the same dimension, and I want to do linear regression (least squares) between them. After searching in google, It seems that Julia used to have a very useful simple function linreg, for doing that …

---

## [Running Julia programs as a service/Unix daemon](https://discourse.julialang.org/t/running-julia-programs-as-a-service-unix-daemon/71770)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [November 19, 2021, 11:53am UTC](https://discourse.julialang.org/t/running-julia-programs-as-a-service-unix-daemon/71770 "2021-11-19T11:53:36Z")

</div>

Is there some package available similar to: Writing a program to become a well-behaved Unix daemon is somewhat complex and tricky to get right, yet the steps are largely similar for any daemon regardless of what else…

---

## [No method matching loop\_einsum](https://discourse.julialang.org/t/no-method-matching-loop-einsum/71638)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 1\
**Last updated:** [November 19, 2021, 10:58am UTC](https://discourse.julialang.org/t/no-method-matching-loop-einsum/71638 "2021-11-19T10:58:54Z")

</div>

How to deal with this when I used the Optim.jl and Zygote.jl packages for optimization, that the function used OMEinsum.jl. ERROR: LoadError: MethodError: no method matching loop\_einsum(::EinCode{((), (2, 1, 3)),(1, 2…

---

## [Activate the global environment](https://discourse.julialang.org/t/activate-the-global-environment/71768)

<div class="topic-metadata">

**Author:** [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)\
**Replies:** 2\
**Last updated:** [November 19, 2021, 10:43am UTC](https://discourse.julialang.org/t/activate-the-global-environment/71768 "2021-11-19T10:43:24Z")

</div>

Hi there, is there a command to re-activate the global environment for packages once it has been switched to a custom folder?

---

## [Strange behavior of intersect() when applied to ranges](https://discourse.julialang.org/t/strange-behavior-of-intersect-when-applied-to-ranges/22313)

<div class="topic-metadata">

**Author:** [@adriano.vilela](https://discourse.julialang.org/u/adriano.vilela)\
**Replies:** 10\
**Last updated:** [November 19, 2021, 10:32am UTC](https://discourse.julialang.org/t/strange-behavior-of-intersect-when-applied-to-ranges/22313 "2021-11-19T10:32:50Z")

</div>

When trying to intersect two ranges I stumbled upon the following behavior: julia\> intersect(2:8, 4:10) 4:8 julia\> intersect(2:7, 5:10) 5:7 julia\> intersect(2:6, 6:10) 6:6 julia\> intersect(2:5, 7:10) 7:6 julia\> inte…

---

## [Sorting a vector of fixed size](https://discourse.julialang.org/t/sorting-a-vector-of-fixed-size/71766)

<div class="topic-metadata">

**Author:** [@AdamR](https://discourse.julialang.org/u/AdamR)\
**Replies:** 5\
**Last updated:** [November 19, 2021, 10:25am UTC](https://discourse.julialang.org/t/sorting-a-vector-of-fixed-size/71766 "2021-11-19T10:25:17Z")

</div>

I need to solve a combinatorics problem, that requires, among others, finding and sortperm (a.k.a. argsort) for thousands of millions of vectors of fixed size. It so happens that the size of the vector is known at the c…

---

## [Possible bug with tuple values in type arguments](https://discourse.julialang.org/t/possible-bug-with-tuple-values-in-type-arguments/71750)

<div class="topic-metadata">

**Author:** [@bgroenks](https://discourse.julialang.org/u/bgroenks)\
**Replies:** 2\
**Last updated:** [November 19, 2021, 9:39am UTC](https://discourse.julialang.org/t/possible-bug-with-tuple-values-in-type-arguments/71750 "2021-11-19T09:39:46Z")

</div>

Hi all, Can anyone explain why the following works: Val{(:a,:b,:c)}() but this does not? Val{(:a,:b,(:c,:d))}() ERROR: TypeError: in Type, in parameter, expected Type, got a value of type Tuple{Symbol, Symbol, Tuple…

---

## [Zoom a \`CairoMakie\` mesh plot](https://discourse.julialang.org/t/zoom-a-cairomakie-mesh-plot/71739)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 4\
**Last updated:** [November 19, 2021, 8:44am UTC](https://discourse.julialang.org/t/zoom-a-cairomakie-mesh-plot/71739 "2021-11-19T08:44:45Z")

</div>

CairoMakie can do a 3d plot of a mesh; e.g. using CairoMakie save("mesh.png", plot(\[1. 0 0;0 1 0;0 0 1;0 0 0\],\[1 2 3;2 3 4\])) How is it possible to zoom such a picture? I tried calling zoom!(m.figure.scene, \[0,0,0\],10.…

---

## [Options for Sparse Distributed Linear Algebra](https://discourse.julialang.org/t/options-for-sparse-distributed-linear-algebra/71744)

<div class="topic-metadata">

**Author:** [@lucasbanting](https://discourse.julialang.org/u/lucasbanting)\
**Replies:** 2\
**Last updated:** [November 19, 2021, 7:52am UTC](https://discourse.julialang.org/t/options-for-sparse-distributed-linear-algebra/71744 "2021-11-19T07:52:21Z")

</div>

What is the current state of sparse distributed linear algebra in Julia? I am interested in switching from C++ to Julia for finite element codes. In C PETSc seems to be the best option for sparse distributed linear alge…

---

## [Problems with Flux NN regression](https://discourse.julialang.org/t/problems-with-flux-nn-regression/71714)

<div class="topic-metadata">

**Author:** [@Bitt](https://discourse.julialang.org/u/Bitt)\
**Replies:** 1\
**Last updated:** [November 19, 2021, 7:39am UTC](https://discourse.julialang.org/t/problems-with-flux-nn-regression/71714 "2021-11-19T07:39:03Z")

</div>

I am trying to make a regression with NN using Flux. I have separated the dataset in the train/test parts and implemented a simple neural network. x\_train, x\_test, y\_train, y\_test = train\_test\_split(convert(Array, x), c…

---

## [Derivative using Interpolations.jl failing](https://discourse.julialang.org/t/derivative-using-interpolations-jl-failing/71759)

<div class="topic-metadata">

**Author:** [@vtomar](https://discourse.julialang.org/u/vtomar)\
**Replies:** 1\
**Last updated:** [November 19, 2021, 6:29am UTC](https://discourse.julialang.org/t/derivative-using-interpolations-jl-failing/71759 "2021-11-19T06:29:01Z")

</div>

I was trying to compute gradient of the points in the y-variable but it errors out: using Interpolations x = 1:6; y = \[1.0,2.0,3.0, 5.0, 10.0, 7.0\]; itp = interpolate((x,), y, Gridded(Linear())); only.(Interpolations.g…

---

## [Fix script that translates Fortran to Julia](https://discourse.julialang.org/t/fix-script-that-translates-fortran-to-julia/71748)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://discourse.julialang.org/u/Beliavsky)\
**Replies:** 4\
**Last updated:** [November 19, 2021, 5:47am UTC](https://discourse.julialang.org/t/fix-script-that-translates-fortran-to-julia/71748 "2021-11-19T05:47:17Z")

</div>

Running with Julia 1.6.1 the script #= This julia script converts fortran 90 code into julia. It uses naive regex replacements to do as much as possible, but the output WILL need further cleanup. Known conversion proble…

---

## [Find max value in density plot](https://discourse.julialang.org/t/find-max-value-in-density-plot/48950)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [November 19, 2021, 4:31am UTC](https://discourse.julialang.org/t/find-max-value-in-density-plot/48950 "2021-11-19T04:31:48Z")

</div>

How do I get the max value of the graph in density(data?) (I want to plot a line on the plot to mark the mean value, as well as two other values. So I need to figure out about how big the plot area is in y-direction, s…

---

## [User-cut with CPLEX](https://discourse.julialang.org/t/user-cut-with-cplex/71490)

<div class="topic-metadata">

**Author:** [@Matheus\_Diogenes\_And](https://discourse.julialang.org/u/Matheus_Diogenes_And)\
**Replies:** 2\
**Last updated:** [November 19, 2021, 4:23am UTC](https://discourse.julialang.org/t/user-cut-with-cplex/71490 "2021-11-19T04:23:28Z")

</div>

Greetings. This thread is related to this one. I am trying to use user-cut with JuMP 0.21.4, Julia 1.6.2, and CPLEX 12.10. Below follows the code I am running. using JuMP, CPLEX model = direct\_model(CPLEX.Optimizer())…

---

## [\[ANN\] PowerFlowData.jl: a parser for PSS/E-format \`.raw\` power flow data files](https://discourse.julialang.org/t/ann-powerflowdata-jl-a-parser-for-pss-e-format-raw-power-flow-data-files/71722)

<div class="topic-metadata">

**Author:** [@npr](https://discourse.julialang.org/u/npr)\
**Replies:** 9\
**Last updated:** [November 19, 2021, 2:43am UTC](https://discourse.julialang.org/t/ann-powerflowdata-jl-a-parser-for-pss-e-format-raw-power-flow-data-files/71722 "2021-11-19T02:43:43Z")

</div>

PowerFlowData.jl is a new package for parsing .raw PSS/E files. (Documentation) This file format is widely used in power systems research, and I hope PowerFlowData.jl will help researchers who need to work with these fi…

---

## [Importing ThinkJulia](https://discourse.julialang.org/t/importing-thinkjulia/71700)

<div class="topic-metadata">

**Author:** [@jmedina](https://discourse.julialang.org/u/jmedina)\
**Replies:** 2\
**Last updated:** [November 19, 2021, 1:28am UTC](https://discourse.julialang.org/t/importing-thinkjulia/71700 "2021-11-19T01:28:30Z")

</div>

Hi, I’m learning some of Julia from “ThinkJulia” (Lauwens & Downey, O’reilly). I’m using the shell in Want to try programming in Julia? and hangs when I do julia\> using ThinkJulia. Does anyone know, why?

---

## [Why is :1 === 1?](https://discourse.julialang.org/t/why-is-1-1/71752)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [November 19, 2021, 12:36am UTC](https://discourse.julialang.org/t/why-is-1-1/71752 "2021-11-19T00:36:26Z")

</div>

julia\> :1 === 1 true I don’t know what else it would be, but why that?

---

## [How to initialize an empty vector of Float64](https://discourse.julialang.org/t/how-to-initialize-an-empty-vector-of-float64/38082)

<div class="topic-metadata">

**Author:** [@QUANG\_VU\_NGUY\_N\_PH\_M](https://discourse.julialang.org/u/QUANG_VU_NGUY_N_PH_M)\
**Replies:** 6\
**Last updated:** [November 18, 2021, 10:19pm UTC](https://discourse.julialang.org/t/how-to-initialize-an-empty-vector-of-float64/38082 "2021-11-18T22:19:44Z")

</div>

struct A{T} time::Vector{Float64} data::Vector{T} end I would like to initialize an empty object of class A I tried with outer constructor as below A() = A(\[\],\[\]) But it failed: julia\> a = A() ERROR: Method…

---

## [\[ANN\] SodShockTube.jl - analytic solution of Sod shock tube problem for fluid dynamics code verification](https://discourse.julialang.org/t/ann-sodshocktube-jl-analytic-solution-of-sod-shock-tube-problem-for-fluid-dynamics-code-verification/71601)

<div class="topic-metadata">

**Author:** [@archermarx](https://discourse.julialang.org/u/archermarx)\
**Replies:** 5\
**Last updated:** [November 18, 2021, 9:44pm UTC](https://discourse.julialang.org/t/ann-sodshocktube-jl-analytic-solution-of-sod-shock-tube-problem-for-fluid-dynamics-code-verification/71601 "2021-11-18T21:44:17Z")

</div>

I’ve just released SodShockTube.jl, which is a pure-Julia implementation of the python Sod Shock tube solver by ibackus (GitHub - ibackus/sod-shocktube: A simple pythonic implementation of a Riemann solver for the analyt…

---

## [Getting non-vectorized code to the speed of vectorized ones](https://discourse.julialang.org/t/getting-non-vectorized-code-to-the-speed-of-vectorized-ones/71525)

<div class="topic-metadata">

**Author:** [@raphaelchinchilla](https://discourse.julialang.org/u/raphaelchinchilla)\
**Replies:** 22\
**Last updated:** [November 18, 2021, 8:42pm UTC](https://discourse.julialang.org/t/getting-non-vectorized-code-to-the-speed-of-vectorized-ones/71525 "2021-11-18T20:42:48Z")

</div>

I am not new to Julia, but I am not really a regular user either. I am trying to make a code that is non vectorized to achieve the performance of a vectorized one, but I cannot do it. Here is the problem in general lines…

---

## [Linux Framebuffer and Julia](https://discourse.julialang.org/t/linux-framebuffer-and-julia/71743)

<div class="topic-metadata">

**Author:** [@scelles](https://discourse.julialang.org/u/scelles)\
**Replies:** 0\
**Last updated:** [November 18, 2021, 8:41pm UTC](https://discourse.julialang.org/t/linux-framebuffer-and-julia/71743 "2021-11-18T20:41:05Z")

</div>

Hello, Linux framebuffer (aka fbdev) is a graphic hardware-independent abstraction layer to show graphics on a computer monitor, typically on the system console. It’s generally available as /dev/fb0 or /dev/fb1 device. …

---

## [Calculating YoY Rate of Change on DF](https://discourse.julialang.org/t/calculating-yoy-rate-of-change-on-df/71715)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 4\
**Last updated:** [November 18, 2021, 6:44pm UTC](https://discourse.julialang.org/t/calculating-yoy-rate-of-change-on-df/71715 "2021-11-18T18:44:51Z")

</div>

Hello Folks: I have a DF that looks like: Year = (2016:1:2021,6) Col1= rand(60:0.5:65, 6) Col2 = rand(20:0.5:25, 6) I would like to calculate the rate of change starting from year 2016 for both Col1 and Col2. Might…

---

## [Why is my custom plot a scene in Makie.jl](https://discourse.julialang.org/t/why-is-my-custom-plot-a-scene-in-makie-jl/71733)

<div class="topic-metadata">

**Author:** [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Replies:** 9\
**Last updated:** [November 18, 2021, 5:28pm UTC](https://discourse.julialang.org/t/why-is-my-custom-plot-a-scene-in-makie-jl/71733 "2021-11-18T17:28:27Z")

</div>

I defined my own recipe for animation in Makie.jl and I wanted to rotate that scene. After a lot of trial and error I tried rotating the plot object, by adding to the method function plot!(customplot::CustomPlot) ..…

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

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