# Latest

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

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

**Page:** 1082

---

## [Finding which var is an invalid type when initialising a struct](https://discourse.julialang.org/t/finding-which-var-is-an-invalid-type-when-initialising-a-struct/78734)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 21\
**Last updated:** [March 31, 2022, 12:16am UTC](https://discourse.julialang.org/t/finding-which-var-is-an-invalid-type-when-initialising-a-struct/78734 "2022-03-31T00:16:01Z")

</div>

I have a function which loads some CSVs, and then constructs a large Struct, sometimes these CSVs contain information as Strings when they should be numerical. Currently When initialising a struct I get the unhelpful err…

---

## [Swapping components of structure "nominally"](https://discourse.julialang.org/t/swapping-components-of-structure-nominally/78768)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 11:58pm UTC](https://discourse.julialang.org/t/swapping-components-of-structure-nominally/78768 "2022-03-30T23:58:13Z")

</div>

I defined the following struture struct AB{T} A::T B::T end with two components of the same numerical type. Sometimes I need to swap the two such that A=-B and B=A. Is there a way to avoid actual swapping the value an…

---

## [What happened to composition function of BioSequences?](https://discourse.julialang.org/t/what-happened-to-composition-function-of-biosequences/78759)

<div class="topic-metadata">

**Author:** [@kwicher](https://discourse.julialang.org/u/kwicher)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 10:45pm UTC](https://discourse.julialang.org/t/what-happened-to-composition-function-of-biosequences/78759 "2022-03-30T22:45:42Z")

</div>

I am trying to implement an older package that uses BioSequences, especially the composition function. This function is however gone from the newest BioSequences, so e everything breaks. Has composition been replaced by…

---

## [A new fast language with good array support and REPL](https://discourse.julialang.org/t/a-new-fast-language-with-good-array-support-and-repl/25850)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 8\
**Last updated:** [March 30, 2022, 7:38pm UTC](https://discourse.julialang.org/t/a-new-fast-language-with-good-array-support-and-repl/25850 "2022-03-30T19:38:38Z")

</div>

I recently came across this new language called V language. It claims to be as fast as C. More interestingly, it has a very straightforward array syntax and a REPL. I guess these two features may make it a good language …

---

## [Periodic boundary conditions for PDE system using MethodOfLines.jl](https://discourse.julialang.org/t/periodic-boundary-conditions-for-pde-system-using-methodoflines-jl/78761)

<div class="topic-metadata">

**Author:** [@Wayne\_Wang](https://discourse.julialang.org/u/Wayne_Wang)\
**Replies:** 7\
**Last updated:** [March 30, 2022, 7:19pm UTC](https://discourse.julialang.org/t/periodic-boundary-conditions-for-pde-system-using-methodoflines-jl/78761 "2022-03-30T19:19:23Z")

</div>

Hi all! I’m working with ModellingToolkit and DiffEqOperators to solve a set of PDEs. In particular, I wanted to test out a 1D Kuramoto-Sivashinsky type of equation with periodic boundary conditions, but I’m having some …

---

## [Filling an array of structs from file contents](https://discourse.julialang.org/t/filling-an-array-of-structs-from-file-contents/78757)

<div class="topic-metadata">

**Author:** [@qt\_codes](https://discourse.julialang.org/u/qt_codes)\
**Replies:** 3\
**Last updated:** [March 30, 2022, 6:55pm UTC](https://discourse.julialang.org/t/filling-an-array-of-structs-from-file-contents/78757 "2022-03-30T18:55:35Z")

</div>

Hi, I have code with a custom struct with different data types mutable struct myStruct name::String = "" id::Int = -1 .... # several more entries of varied types .... end I want to read a file and u…

---

## [Installed Julia from Microsoft Store - now I cannot install any packages?](https://discourse.julialang.org/t/installed-julia-from-microsoft-store-now-i-cannot-install-any-packages/78640)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [March 30, 2022, 6:38pm UTC](https://discourse.julialang.org/t/installed-julia-from-microsoft-store-now-i-cannot-install-any-packages/78640 "2022-03-30T18:38:09Z")

</div>

add https://github.com/AhmedSalih3d/PostSPH.jl#master Updating git-repo \`https://github.com/AhmedSalih3d/PostSPH.jl\` Resolving package versions... ERROR: KeyError: key UUID("4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5") …

---

## [Can the output of --track-allocation be trusted with multi-threading enabled?](https://discourse.julialang.org/t/can-the-output-of-track-allocation-be-trusted-with-multi-threading-enabled/78744)

<div class="topic-metadata">

**Author:** [@krcools](https://discourse.julialang.org/u/krcools)\
**Replies:** 9\
**Last updated:** [March 30, 2022, 6:07pm UTC](https://discourse.julialang.org/t/can-the-output-of-track-allocation-be-trusted-with-multi-threading-enabled/78744 "2022-03-30T18:07:43Z")

</div>

Below the output of --track-allocation. The first time when the code is ran with a single thread, the second time when the work is divided and the code is called from 8 threads. Is this output to be trusted? If so where …

---

## [Problem loading ML model using DataDeps](https://discourse.julialang.org/t/problem-loading-ml-model-using-datadeps/78692)

<div class="topic-metadata">

**Author:** [@Maxim\_Lubov](https://discourse.julialang.org/u/Maxim_Lubov)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 6:03pm UTC](https://discourse.julialang.org/t/problem-loading-ml-model-using-datadeps/78692 "2022-03-30T18:03:51Z")

</div>

@oxinabox Hello everyone. I have a problem loading ML model using DataDeps. I load model via shared link to Google Drive. Model should be loaded to a specific folder on my drive, so I set: ENV\["DATADEPS\_ALWAYS\_AC…

---

## [Issue with 2 y axis using twinx with subplots using Plots.jl](https://discourse.julialang.org/t/issue-with-2-y-axis-using-twinx-with-subplots-using-plots-jl/78696)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 5\
**Last updated:** [March 30, 2022, 5:04pm UTC](https://discourse.julialang.org/t/issue-with-2-y-axis-using-twinx-with-subplots-using-plots-jl/78696 "2022-03-30T17:04:12Z")

</div>

Hi everyone, I am trying to make a very simple plot using Plots and I can’t make it work. My goal is to use layout to have 2 subplots. The first 1 has to have two different y axis, using twinx I assume. My problem is t…

---

## [Understanding an error in a reverse call of DiffEqFlux.sciml\_train](https://discourse.julialang.org/t/understanding-an-error-in-a-reverse-call-of-diffeqflux-sciml-train/78680)

<div class="topic-metadata">

**Author:** [@linkz](https://discourse.julialang.org/u/linkz)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 4:40pm UTC](https://discourse.julialang.org/t/understanding-an-error-in-a-reverse-call-of-diffeqflux-sciml-train/78680 "2022-03-30T16:40:43Z")

</div>

I am trying to train a custom, quite complex model, am getting the following error during the reverse call to calculate gradients (using DiffEqFlux.sciml\_train for optimization) and I struggle to understand what it means…

---

## [Julia PR team?](https://discourse.julialang.org/t/julia-pr-team/78700)

<div class="topic-metadata">

**Author:** [@AMJ](https://discourse.julialang.org/u/AMJ)\
**Replies:** 6\
**Last updated:** [March 30, 2022, 4:18pm UTC](https://discourse.julialang.org/t/julia-pr-team/78700 "2022-03-30T16:18:51Z")

</div>

Does the Julia team (or JuliaHub if they can manage here) have a PR person/team ? If not I think the team should definitely get one(if possible). It is extremely important to protect the community and those generous con…

---

## [How to change CSS and remove double newline for @repl block in Documenter output?](https://discourse.julialang.org/t/how-to-change-css-and-remove-double-newline-for-repl-block-in-documenter-output/78753)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 4:16pm UTC](https://discourse.julialang.org/t/how-to-change-css-and-remove-double-newline-for-repl-block-in-documenter-output/78753 "2022-03-30T16:16:07Z")

</div>

Hello, I would like to make a couple of customisations to a Documenter output, more specifically when the @repl block is used: setting padding-bottom and padding-top to 0.1rem instead of 0.7 remove the extra newline be…

---

## [Julia is slower than MATLAB at diagonalizing matrices](https://discourse.julialang.org/t/julia-is-slower-than-matlab-at-diagonalizing-matrices/78174)

<div class="topic-metadata">

**Author:** [@poopsilon](https://discourse.julialang.org/u/poopsilon)\
**Replies:** 41\
**Last updated:** [March 30, 2022, 4:04pm UTC](https://discourse.julialang.org/t/julia-is-slower-than-matlab-at-diagonalizing-matrices/78174 "2022-03-30T16:04:05Z")

</div>

I’ve been learning Julia in the past week and in the process, I have re-written one of my programs, which I previously implemented in MATLAB. I noticed the program in Julia was quite noticeably slower than the MATLAB ver…

---

## [\[ANN\] AbnormalReturns.jl: The fastest method for calculating abnormal returns](https://discourse.julialang.org/t/ann-abnormalreturns-jl-the-fastest-method-for-calculating-abnormal-returns/78752)

<div class="topic-metadata">

**Author:** [@junder873](https://discourse.julialang.org/u/junder873)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 3:41pm UTC](https://discourse.julialang.org/t/ann-abnormalreturns-jl-the-fastest-method-for-calculating-abnormal-returns/78752 "2022-03-30T15:41:17Z")

</div>

I am happy to announce AbnormalReturns.jl, which, as far as I am aware, is the fastest method to calculate abnormal returns. What are abnormal returns? Abnormal returns are common in finance and economics event studies,…

---

## [KeyError when updating packages](https://discourse.julialang.org/t/keyerror-when-updating-packages/78740)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 2:28pm UTC](https://discourse.julialang.org/t/keyerror-when-updating-packages/78740 "2022-03-30T14:28:19Z")

</div>

Hi all, Since some hours ago I can’t seem to update my packages : here is the result I get. (@v1.6) pkg\> update ERROR: KeyError: key "BitTwiddlingConvenienceFunctions" not found Stacktrace: \[1\] getindex @ ./dict.…

---

## [Avoid explicit conversion from scientific notation to int for generic struct](https://discourse.julialang.org/t/avoid-explicit-conversion-from-scientific-notation-to-int-for-generic-struct/78739)

<div class="topic-metadata">

**Author:** [@Uroc327](https://discourse.julialang.org/u/Uroc327)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 1:56pm UTC](https://discourse.julialang.org/t/avoid-explicit-conversion-from-scientific-notation-to-int-for-generic-struct/78739 "2022-03-30T13:56:21Z")

</div>

Generic structs need an explicit conversion from double to int whereas non-generic don’t. I find this a bit confusing due to the inconsistency. Is there a way to avoid the explicit conversion? Example: struct A a::…

---

## [Indentation and the end statement](https://discourse.julialang.org/t/indentation-and-the-end-statement/74076)

<div class="topic-metadata">

**Author:** [@TheGrowingPlant443](https://discourse.julialang.org/u/TheGrowingPlant443)\
**Replies:** 37\
**Last updated:** [March 30, 2022, 1:34pm UTC](https://discourse.julialang.org/t/indentation-and-the-end-statement/74076 "2022-03-30T13:34:08Z")

</div>

My surgestion is that you can some how be able to switch to an indentation version of Julia at the top of your document. So you both have a version with end statement and a version without. I know the developers of julia…

---

## [Fail to update my own Package](https://discourse.julialang.org/t/fail-to-update-my-own-package/78677)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 6\
**Last updated:** [March 30, 2022, 1:02pm UTC](https://discourse.julialang.org/t/fail-to-update-my-own-package/78677 "2022-03-30T13:02:10Z")

</div>

Hi, I have created the package EspyInsideFunction.jl, which is publicly available on GIT and is in the Julia registry. I have updated EspyInsideFunction.jl: a new commit of master, with tag \`\`0.1.2\`. Pushed, and check…

---

## [Makie: GLMakie backend fails to join the points in lines plot](https://discourse.julialang.org/t/makie-glmakie-backend-fails-to-join-the-points-in-lines-plot/78724)

<div class="topic-metadata">

**Author:** [@kunzaatko](https://discourse.julialang.org/u/kunzaatko)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 12:51pm UTC](https://discourse.julialang.org/t/makie-glmakie-backend-fails-to-join-the-points-in-lines-plot/78724 "2022-03-30T12:51:11Z")

</div>

In line graphs using Makie with the backend GLMakie, the lines are not joined together. I do not know how to debug this. I suspect that this is an issue with my OpenGL. The compilation of GLMakie did not throw any warnin…

---

## [Tsit5 algorithm gives wrong results while lower order methods like Midpoint work fine](https://discourse.julialang.org/t/tsit5-algorithm-gives-wrong-results-while-lower-order-methods-like-midpoint-work-fine/78728)

<div class="topic-metadata">

**Author:** [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Replies:** 3\
**Last updated:** [March 30, 2022, 12:12pm UTC](https://discourse.julialang.org/t/tsit5-algorithm-gives-wrong-results-while-lower-order-methods-like-midpoint-work-fine/78728 "2022-03-30T12:12:47Z")

</div>

Hello I was solving a test problem of a 1 DOF system with a friction interface. I was somewhat surprised that when I integrated the problem, Tsit5() gives very wrong results even when setting very low tolerances. Other …

---

## [Learning to Rank with Categorical variables](https://discourse.julialang.org/t/learning-to-rank-with-categorical-variables/78735)

<div class="topic-metadata">

**Author:** [@Billpete002](https://discourse.julialang.org/u/Billpete002)\
**Replies:** 0\
**Last updated:** [March 30, 2022, 11:56am UTC](https://discourse.julialang.org/t/learning-to-rank-with-categorical-variables/78735 "2022-03-30T11:56:35Z")

</div>

Hi all, I have a question about which package should I use for running against categorical and numerical values that will rank the results similar to Catboost with ranking as the objective. I know there is pycall.jl but…

---

## [Error: findfirst(((x,y))-\>x==1, \[(1,2), (3,4)\])](https://discourse.julialang.org/t/error-findfirst-x-y-x-1-1-2-3-4/78733)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 3\
**Last updated:** [March 30, 2022, 11:55am UTC](https://discourse.julialang.org/t/error-findfirst-x-y-x-1-1-2-3-4/78733 "2022-03-30T11:55:30Z")

</div>

Why does this fail? :thinking: julia\> findfirst(((x,y))-\>x==1, \[(1,2), (3,4)\]) ERROR: MethodError: no method matching (::var"#7#8")(::Tuple{Int64, Int64}) while these two are fine: julia\> findfirst(\[(1,2), (3,4)\]) d…

---

## [Koopman inference fails for simple example while SINDy works fine](https://discourse.julialang.org/t/koopman-inference-fails-for-simple-example-while-sindy-works-fine/78706)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 11:00am UTC](https://discourse.julialang.org/t/koopman-inference-fails-for-simple-example-while-sindy-works-fine/78706 "2022-03-30T11:00:17Z")

</div>

Hi All, I’m trying to put together a DataDrivenDiffEq.jl example for my demo system of an SIR epidemiological model. using OrdinaryDiffEq using DataDrivenDiffEq using ModelingToolkit function sir\_ode(u,p,t) (s,i,r…

---

## [Monte Carlo Tree Search](https://discourse.julialang.org/t/monte-carlo-tree-search/78591)

<div class="topic-metadata">

**Author:** [@clrescobar](https://discourse.julialang.org/u/clrescobar)\
**Replies:** 6\
**Last updated:** [March 30, 2022, 10:31am UTC](https://discourse.julialang.org/t/monte-carlo-tree-search/78591 "2022-03-30T10:31:16Z")

</div>

Hello, I am using the Monte-Carlo Tree Search algorithm for my MDP (find it here). Every time I run it I get a different action for each node, is it normal? Thanks!

---

## [Using struct defined in a different module results in an error](https://discourse.julialang.org/t/using-struct-defined-in-a-different-module-results-in-an-error/78603)

<div class="topic-metadata">

**Author:** [@J4Q8](https://discourse.julialang.org/u/J4Q8)\
**Replies:** 3\
**Last updated:** [March 30, 2022, 9:50am UTC](https://discourse.julialang.org/t/using-struct-defined-in-a-different-module-results-in-an-error/78603 "2022-03-30T09:50:26Z")

</div>

Hi! I am new to julia, so I wanted to try out some code. Everything was nice and clear until I started using multiple scripts. I simplified them to necessary minimum to reproduce error that is bugging me. “trees.jl” m…

---

## [Scratch or line detection in images](https://discourse.julialang.org/t/scratch-or-line-detection-in-images/78708)

<div class="topic-metadata">

**Author:** [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 8:16am UTC](https://discourse.julialang.org/t/scratch-or-line-detection-in-images/78708 "2022-03-30T08:16:21Z")

</div>

I have a general question regarding which package I should use to process image files to extract features like straight lines, scratches, arcs and other such features. Thanks.

---

## [Constructor bug, what am I missing?](https://discourse.julialang.org/t/constructor-bug-what-am-i-missing/78723)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 8:12am UTC](https://discourse.julialang.org/t/constructor-bug-what-am-i-missing/78723 "2022-03-30T08:12:49Z")

</div>

This construct bug is so strange, I can’t find where I am wrong. struct tcg{F,T} a::F b::T tcg(b::T,a::F=nothing) where {F,T}=new{F,T}(a,b) tcg(a::F,b::T) where {F,T}=new{F,T}(a,b) end tcg(10) The out…

---

## [When to parallelise, when not to?](https://discourse.julialang.org/t/when-to-parallelise-when-not-to/78722)

<div class="topic-metadata">

**Author:** [@ayushinav](https://discourse.julialang.org/u/ayushinav)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 7:30am UTC](https://discourse.julialang.org/t/when-to-parallelise-when-not-to/78722 "2022-03-30T07:30:17Z")

</div>

Hey all, I’m stuck on understanding when to realize that the code will benefit from parallel processing, when not; when to take it on GPUs when not. I have a code that runs as fast as it can (that’s what I think, could…

---

## [Makie.jl perspective camera](https://discourse.julialang.org/t/makie-jl-perspective-camera/78709)

<div class="topic-metadata">

**Author:** [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 6:08am UTC](https://discourse.julialang.org/t/makie-jl-perspective-camera/78709 "2022-03-30T06:08:56Z")

</div>

I know Makie is capable of perspective 3D plots, but can’t find it documented anywhere. In a scene like the following, how do I make the camera projection type perspective instead of orthographic? using GLMakie fig = F…

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

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