# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=430

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

**Page:** 431

---

## [Strange behavior of BlockDiagonal constructor with Vector of BandedMatrices](https://discourse.julialang.org/t/strange-behavior-of-blockdiagonal-constructor-with-vector-of-bandedmatrices/83409)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 3\
**Last updated:** [June 27, 2022, 3:35pm UTC](https://discourse.julialang.org/t/strange-behavior-of-blockdiagonal-constructor-with-vector-of-bandedmatrices/83409 "2022-06-27T15:35:25Z")

</div>

As you can see from the MWE I have to call D = BlockDiagonal(\[Dbv\[1\], Dbv\[2\], Dbv\[3\]\]) instead of D = BlockDiagonal(Dbv) . It seems that some type information is lost when the Vector is banded matrices is created, but th…

---

## [Argument validation using Struct](https://discourse.julialang.org/t/argument-validation-using-struct/83397)

<div class="topic-metadata">

**Author:** [@4mSwell](https://discourse.julialang.org/u/4mSwell)\
**Replies:** 7\
**Last updated:** [June 27, 2022, 3:08pm UTC](https://discourse.julialang.org/t/argument-validation-using-struct/83397 "2022-06-27T15:08:07Z")

</div>

I am having trouble executing the code snippet below that was contributed on an old thread. My objective is to define a struct that I can use to validate arguments inside function definitions. Any argument that is not …

---

## [PackageCompiler library fail to find artifacts when relocated](https://discourse.julialang.org/t/packagecompiler-library-fail-to-find-artifacts-when-relocated/83405)

<div class="topic-metadata">

**Author:** [@stefanjon](https://discourse.julialang.org/u/stefanjon)\
**Replies:** 0\
**Last updated:** [June 27, 2022, 2:23pm UTC](https://discourse.julialang.org/t/packagecompiler-library-fail-to-find-artifacts-when-relocated/83405 "2022-06-27T14:23:06Z")

</div>

Hi, I am building a julia library using create\_library that I use in a larger python standalone app to be run on windows machines. It works fine on several machine but when I try to relocate the app to a computer witho…

---

## [Function that only accepts odd number argument](https://discourse.julialang.org/t/function-that-only-accepts-odd-number-argument/27502)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 14\
**Last updated:** [June 27, 2022, 12:16pm UTC](https://discourse.julialang.org/t/function-that-only-accepts-odd-number-argument/27502 "2022-06-27T12:16:30Z")

</div>

If I have a function that should only accept odd integers, what’s the best way to implement this? Should I create a new OddInt type and only allow that, or just check whether the integer is odd inside the function and th…

---

## [Julia's equivalent to Python's Paramiko](https://discourse.julialang.org/t/julias-equivalent-to-pythons-paramiko/83398)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 0\
**Last updated:** [June 27, 2022, 12:10pm UTC](https://discourse.julialang.org/t/julias-equivalent-to-pythons-paramiko/83398 "2022-06-27T12:10:01Z")

</div>

I am trying to port Python’s code to Julia that makes use of the low level library Paramiko to execute remote commands over ssh. Is there an equivalent library available for Julia?

---

## [Calling functions with arbitrary combination of given argument names inside other functions](https://discourse.julialang.org/t/calling-functions-with-arbitrary-combination-of-given-argument-names-inside-other-functions/83388)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 1\
**Last updated:** [June 27, 2022, 11:07am UTC](https://discourse.julialang.org/t/calling-functions-with-arbitrary-combination-of-given-argument-names-inside-other-functions/83388 "2022-06-27T11:07:38Z")

</div>

For ease of use and readability in a program that I’m writing, I would like users to be able to define functions with any combination (and if possible order) of a fixed set of symbols, say {a,b,c,d}. This function needs …

---

## [How to report intercept iterm in FixedEffectModels?](https://discourse.julialang.org/t/how-to-report-intercept-iterm-in-fixedeffectmodels/83386)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 3\
**Last updated:** [June 27, 2022, 9:21am UTC](https://discourse.julialang.org/t/how-to-report-intercept-iterm-in-fixedeffectmodels/83386 "2022-06-27T09:21:18Z")

</div>

Dear all, In FixedEffectModels with fe, the result doesn’t report intercept term. Anyone knows how to report constant term? julia\> df = dataset("plm", "GrunFeld") julia\> reg(df, @formula(Inv ~ Value + Capital + Year + …

---

## [How to convert day of year (DOY) to date](https://discourse.julialang.org/t/how-to-convert-day-of-year-doy-to-date/83290)

<div class="topic-metadata">

**Author:** [@Bjorn\_De](https://discourse.julialang.org/u/Bjorn_De)\
**Replies:** 3\
**Last updated:** [June 27, 2022, 6:07am UTC](https://discourse.julialang.org/t/how-to-convert-day-of-year-doy-to-date/83290 "2022-06-27T06:07:25Z")

</div>

Hey, I cannot find a solution to convert DOY to date, for example Date("2021-146", "yyyy-ddd") is not working. Any ideas? Thanks Bjoern

---

## [DataInterpolations.jl - defining function without broadcasting syntax](https://discourse.julialang.org/t/datainterpolations-jl-defining-function-without-broadcasting-syntax/83366)

<div class="topic-metadata">

**Author:** [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Replies:** 1\
**Last updated:** [June 27, 2022, 1:35am UTC](https://discourse.julialang.org/t/datainterpolations-jl-defining-function-without-broadcasting-syntax/83366 "2022-06-27T01:35:05Z")

</div>

I’m trying to fit a curve using DataInterpolations.jl and want to fit a curve with some fixed and variable parameters. The fixed number of terms can vary, which is why I’m starting with a sum of a generator (below, take c…

---

## [Why Base.summarysize is not exported to Main?](https://discourse.julialang.org/t/why-base-summarysize-is-not-exported-to-main/83367)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 3\
**Last updated:** [June 27, 2022, 12:30am UTC](https://discourse.julialang.org/t/why-base-summarysize-is-not-exported-to-main/83367 "2022-06-27T00:30:26Z")

</div>

I find more useful Base.summarysize than sizeof so why summarysize is not exported to Main? v = collect(1:1000); s = Set(v); sizeof(v), sizeof(s) Base.summarysize(v), Base.summarysize(s) (Base.summarysize(v), Base.summa…

---

## [Making multivariate Kolmogorov-Smirnov benchmarks](https://discourse.julialang.org/t/making-multivariate-kolmogorov-smirnov-benchmarks/75114)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 8\
**Last updated:** [June 26, 2022, 10:01pm UTC](https://discourse.julialang.org/t/making-multivariate-kolmogorov-smirnov-benchmarks/75114 "2022-06-26T22:01:47Z")

</div>

Hey, I’m trying to produce empirical multivariate Kolmogorov-Smirnov benchs to later benchmark an estimator. I have the following code for the moment : # The goal of this file is to compute kolmogorov-smirnov p-values …

---

## [How to play an audio in Julia?](https://discourse.julialang.org/t/how-to-play-an-audio-in-julia/31881)

<div class="topic-metadata">

**Author:** [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Replies:** 33\
**Last updated:** [June 26, 2022, 9:24pm UTC](https://discourse.julialang.org/t/how-to-play-an-audio-in-julia/31881 "2022-06-26T21:24:26Z")

</div>

Since AudioIO.jl is unmaintained and LibSndFile.jl isn’t working well. There is another “famous” Julia’s audio module? I have an audio in .ogg or .mp3 (any format). I want to read and play it.

---

## [Bug or feature of the NamedTuple constuctor](https://discourse.julialang.org/t/bug-or-feature-of-the-namedtuple-constuctor/83368)

<div class="topic-metadata">

**Author:** [@misha\_mikhasenko](https://discourse.julialang.org/u/misha_mikhasenko)\
**Replies:** 1\
**Last updated:** [June 26, 2022, 8:50pm UTC](https://discourse.julialang.org/t/bug-or-feature-of-the-namedtuple-constuctor/83368 "2022-06-26T20:50:57Z")

</div>

julia\> NamedTuple{(:a,:b)}((; b=2, a=1)) (a = 1, b = 2) julia\> NamedTuple{(:a,:b), NTuple{2,Int}}((; b=2, a=1)) (a = 2, b = 1) Curious, is not it?

---

## [Question about FixedEffectModels?](https://discourse.julialang.org/t/question-about-fixedeffectmodels/83363)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 7\
**Last updated:** [June 26, 2022, 5:26pm UTC](https://discourse.julialang.org/t/question-about-fixedeffectmodels/83363 "2022-06-26T17:26:20Z")

</div>

Dear all, When I use FixedEffectModels with Vcov.cluster, I get the different p values from the results of Stata. julia\> using DataFrames, RDatasets, FixedEffectModels julia\> df = dataset("plm", "GrunFeld"); julia\> …

---

## [Github CI with private repository in Julia](https://discourse.julialang.org/t/github-ci-with-private-repository-in-julia/81207)

<div class="topic-metadata">

**Author:** [@davide-f](https://discourse.julialang.org/u/davide-f)\
**Replies:** 13\
**Last updated:** [June 26, 2022, 2:46pm UTC](https://discourse.julialang.org/t/github-ci-with-private-repository-in-julia/81207 "2022-06-26T14:46:04Z")

</div>

Dear Community, I am having problems on a CI of a private repository of mine, the following error arises during the buildkpg phase of the CI: caused by: GitError(Code:EUSER, Class:Callback, Aborting, user cancelled cre…

---

## [Converting array of array of array to multidimensional array](https://discourse.julialang.org/t/converting-array-of-array-of-array-to-multidimensional-array/34337)

<div class="topic-metadata">

**Author:** [@luiarthur](https://discourse.julialang.org/u/luiarthur)\
**Replies:** 9\
**Last updated:** [June 26, 2022, 7:42am UTC](https://discourse.julialang.org/t/converting-array-of-array-of-array-to-multidimensional-array/34337 "2022-06-26T07:42:11Z")

</div>

Hi, Not sure if this has been answered already. My question is similar to this topic: Very best way to concatenate an array of arrays Basically, I want a more general solution. That is, if I have a multidimensional ar…

---

## [Efficient recursive iteration over self referencing struct](https://discourse.julialang.org/t/efficient-recursive-iteration-over-self-referencing-struct/83322)

<div class="topic-metadata">

**Author:** [@dylanxyz](https://discourse.julialang.org/u/dylanxyz)\
**Replies:** 11\
**Last updated:** [June 25, 2022, 11:48pm UTC](https://discourse.julialang.org/t/efficient-recursive-iteration-over-self-referencing-struct/83322 "2022-06-25T23:48:47Z")

</div>

Suppose i have a Node type that may have a reference to itself on one of its fields. What is the most efficient way to implement Base.iterate for this Node type, such that at every iteration we get the next child Node? j…

---

## [Particle Collision related development where thermal energy, concentration, mass(gravitational) well defined](https://discourse.julialang.org/t/particle-collision-related-development-where-thermal-energy-concentration-mass-gravitational-well-defined/83344)

<div class="topic-metadata">

**Author:** [@wasiful\_alam](https://discourse.julialang.org/u/wasiful_alam)\
**Replies:** 0\
**Last updated:** [June 25, 2022, 10:26pm UTC](https://discourse.julialang.org/t/particle-collision-related-development-where-thermal-energy-concentration-mass-gravitational-well-defined/83344 "2022-06-25T22:26:04Z")

</div>

Hi, Need to know if there any package in Julia where Temperature, Mass, Velocity, Density, Length and Time well defined, Constants are being used. so that in any equation those can be easily written. Any previous simul…

---

## [Do C++ performance optimisations apply to Julia?](https://discourse.julialang.org/t/do-c-performance-optimisations-apply-to-julia/82567)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 28\
**Last updated:** [June 25, 2022, 8:29pm UTC](https://discourse.julialang.org/t/do-c-performance-optimisations-apply-to-julia/82567 "2022-06-25T20:29:19Z")

</div>

Hello everyone :slight\_smile: I came across a set of tips for optimising C++ raytracing code written by Chris Wyman and wondered how much of it applies to Julia. In total there are 27 tips which I’ll share below along w…

---

## [Product iterator with NamedTuples](https://discourse.julialang.org/t/product-iterator-with-namedtuples/83319)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 5\
**Last updated:** [June 25, 2022, 5:42pm UTC](https://discourse.julialang.org/t/product-iterator-with-namedtuples/83319 "2022-06-25T17:42:29Z")

</div>

Hi all, I was wondering whether it is possible to create a product iterator consisting of NamedTuples. The product iterator generates tuples like so: Base.product(1:3,4:5) |\> collect 3×2 Matrix{Tuple{Int64, Int64}}: …

---

## [Question about plot?](https://discourse.julialang.org/t/question-about-plot/83336)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 3\
**Last updated:** [June 25, 2022, 5:24pm UTC](https://discourse.julialang.org/t/question-about-plot/83336 "2022-06-25T17:24:37Z")

</div>

Dear all, How to fill color between (2, 3) in the graph below? julia\> using Distributions julia\> plot(Normal(0, 1))

---

## [How to change window size of InspectDR](https://discourse.julialang.org/t/how-to-change-window-size-of-inspectdr/82268)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 9\
**Last updated:** [June 25, 2022, 4:48pm UTC](https://discourse.julialang.org/t/how-to-change-window-size-of-inspectdr/82268 "2022-06-25T16:48:48Z")

</div>

I am not able to change the size of the plot window. Example code: using Plots; inspectdr() x=0:0.05:100 y1=sin.(x) p1 = plot(x,y1, size=(1200,700), legend=false) display(p1); The size is always small, about 640x480.…

---

## [Parquet on M1](https://discourse.julialang.org/t/parquet-on-m1/83323)

<div class="topic-metadata">

**Author:** [@JackStrauss](https://discourse.julialang.org/u/JackStrauss)\
**Replies:** 11\
**Last updated:** [June 25, 2022, 1:52pm UTC](https://discourse.julialang.org/t/parquet-on-m1/83323 "2022-06-25T13:52:47Z")

</div>

Hello Everybody Parquet files are great, and we happily read and write them in Julia on Linux. But not on a Mac M1, there are 2 competing libraries, Expanding Man / Parquet2.jl · GitLab and GitHub - JuliaIO/Parquet.jl:…

---

## [How to get forward and backward error using LinearAlgebra package](https://discourse.julialang.org/t/how-to-get-forward-and-backward-error-using-linearalgebra-package/83327)

<div class="topic-metadata">

**Author:** [@hemraj4545](https://discourse.julialang.org/u/hemraj4545)\
**Replies:** 1\
**Last updated:** [June 25, 2022, 1:20pm UTC](https://discourse.julialang.org/t/how-to-get-forward-and-backward-error-using-linearalgebra-package/83327 "2022-06-25T13:20:44Z")

</div>

I am using LU Factorization to solve equations, but I want forward and backward error, relative forward and backward error. I thought of using LinearAlgebra for this, and found LinearAlgebra.LAPACK.trrfs!() function can …

---

## [Streaming julia terminal output (stdout stderr) to http server](https://discourse.julialang.org/t/streaming-julia-terminal-output-stdout-stderr-to-http-server/83293)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 1\
**Last updated:** [June 25, 2022, 11:46am UTC](https://discourse.julialang.org/t/streaming-julia-terminal-output-stdout-stderr-to-http-server/83293 "2022-06-25T11:46:29Z")

</div>

I have a Julia monitoring script (an infinite loop) which is gathering data from several sources and writing it to different MariaDB databases. I would now like to run this as a service. Is there a simple why that I can…

---

## [Libgit2 ERROR: AssertionError: name == "helper"](https://discourse.julialang.org/t/libgit2-error-assertionerror-name-helper/82783)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 3\
**Last updated:** [June 25, 2022, 4:02am UTC](https://discourse.julialang.org/t/libgit2-error-assertionerror-name-helper/82783 "2022-06-25T04:02:29Z")

</div>

Cloning a repo when instantiating generated the above error. Any idea what to do? (ACol) pkg\> add https://github.com/PetrKryslUCSD/HelmBEM.jl.git Cloning git-repo \`https://github.com/PetrKryslUCSD/HelmBEM.jl.git\` E…

---

## [Variance-Covariance matrix with missing data](https://discourse.julialang.org/t/variance-covariance-matrix-with-missing-data/83312)

<div class="topic-metadata">

**Author:** [@Baba\_Yara\_Fahiz](https://discourse.julialang.org/u/Baba_Yara_Fahiz)\
**Replies:** 5\
**Last updated:** [June 25, 2022, 12:17am UTC](https://discourse.julialang.org/t/variance-covariance-matrix-with-missing-data/83312 "2022-06-25T00:17:39Z")

</div>

I am working with financial data where I have 600 matrices that are all 61 by 25000. I am computing the variance-covariance matrix but running into performance issues because of missing data. The way I am handling the …

---

## [Generic functions with irrationals that work with Symbolics / ModelingToolkit](https://discourse.julialang.org/t/generic-functions-with-irrationals-that-work-with-symbolics-modelingtoolkit/83205)

<div class="topic-metadata">

**Author:** [@moble](https://discourse.julialang.org/u/moble)\
**Replies:** 4\
**Last updated:** [June 24, 2022, 9:12pm UTC](https://discourse.julialang.org/t/generic-functions-with-irrationals-that-work-with-symbolics-modelingtoolkit/83205 "2022-06-24T21:12:32Z")

</div>

I have some functions that basically evaluate polynomials with coefficients given by enormous expressions. I want to support multiple precisions — like Float64 and Double64 — but also symbolic operations. And some of t…

---

## [How to protect a task from being blocked by other background tasks?](https://discourse.julialang.org/t/how-to-protect-a-task-from-being-blocked-by-other-background-tasks/83321)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 3\
**Last updated:** [June 24, 2022, 8:34pm UTC](https://discourse.julialang.org/t/how-to-protect-a-task-from-being-blocked-by-other-background-tasks/83321 "2022-06-24T20:34:14Z")

</div>

I have a local service that uses HTTP.jl to handle simple API requests running on the main task and then a background task (started with Threads.@spawn) that periodically loads data from a SQL database, does heavy comput…

---

## [""" changed to \`\`\` in installed package preventing documentation build](https://discourse.julialang.org/t/changed-to-in-installed-package-preventing-documentation-build/83317)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 1\
**Last updated:** [June 24, 2022, 6:15pm UTC](https://discourse.julialang.org/t/changed-to-in-installed-package-preventing-documentation-build/83317 "2022-06-24T18:15:50Z")

</div>

In my repo, documentation strings are wrapped in tripple double-quotes: julia make.jl Activating project at \`c:\\Users\\Mark Nahabedian\\NahaJuliaLib.jl\\docs\` ERROR: LoadError: parsing command \` propertynames\_from\_v…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=429)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=431)
