# Latest

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

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

**Page:** 1775

---

## [New to Julia, and want to implement a Log\_Prior](https://discourse.julialang.org/t/new-to-julia-and-want-to-implement-a-log-prior/37627)

<div class="topic-metadata">

**Author:** [@Rezvious](https://discourse.julialang.org/u/Rezvious)\
**Replies:** 2\
**Last updated:** [April 15, 2020, 11:26am UTC](https://discourse.julialang.org/t/new-to-julia-and-want-to-implement-a-log-prior/37627 "2020-04-15T11:26:32Z")

</div>

hello everyone, I’m new in Julia and I wanted to implement a function log\_prior that computes the log of multivariate normal distribution. would you mind please help me to implement it?

---

## [Using Documenter.jl for non-Julia package documentation](https://discourse.julialang.org/t/using-documenter-jl-for-non-julia-package-documentation/37511)

<div class="topic-metadata">

**Author:** [@tedsteiner](https://discourse.julialang.org/u/tedsteiner)\
**Replies:** 2\
**Last updated:** [April 15, 2020, 10:45am UTC](https://discourse.julialang.org/t/using-documenter-jl-for-non-julia-package-documentation/37511 "2020-04-15T10:45:59Z")

</div>

I recently tried using Documenter.jl to add documentation to a Julia package and I really liked how it worked. I was thinking about using Documenter.jl to write documentation for non-Julia packages and was wondering if a…

---

## [Modify elements of struct without changing original inputs](https://discourse.julialang.org/t/modify-elements-of-struct-without-changing-original-inputs/37592)

<div class="topic-metadata">

**Author:** [@corbat](https://discourse.julialang.org/u/corbat)\
**Replies:** 2\
**Last updated:** [April 15, 2020, 6:53am UTC](https://discourse.julialang.org/t/modify-elements-of-struct-without-changing-original-inputs/37592 "2020-04-15T06:53:14Z")

</div>

Hi, I have a question regarding a situation where I want to pass a (mutable) struct to another struct. Please see the MWE below. mutable struct MyStruct arr::Array{Real, 1} end struct MyOtherStruct ms::MyStru…

---

## [Memory issues](https://discourse.julialang.org/t/memory-issues/37594)

<div class="topic-metadata">

**Author:** [@natgeo-wong](https://discourse.julialang.org/u/natgeo-wong)\
**Replies:** 3\
**Last updated:** [April 15, 2020, 6:47am UTC](https://discourse.julialang.org/t/memory-issues/37594 "2020-04-15T06:47:57Z")

</div>

Hi! Got a question on memory handling: For the following script nlon = 360; nlat = 181; nhr = 744; np = 37; for loop = 1 : 5 @info "$(Dates.now()) - Preallocating arrays ..." Ta = zeros(nlon,nlat,nhr,np); sH…

---

## [Julia function help page](https://discourse.julialang.org/t/julia-function-help-page/37605)

<div class="topic-metadata">

**Author:** [@Jing\_Zhang](https://discourse.julialang.org/u/Jing_Zhang)\
**Replies:** 5\
**Last updated:** [April 15, 2020, 6:38am UTC](https://discourse.julialang.org/t/julia-function-help-page/37605 "2020-04-15T06:38:40Z")

</div>

Dear experienced Julia users, Does Julia offer a help page like R? In R, if you type ?function\_name, a help page will show up with explanations of all arguments and some examples. In Julia, however, if I type ?functio…

---

## [A question about my code](https://discourse.julialang.org/t/a-question-about-my-code/37611)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 4\
**Last updated:** [April 15, 2020, 6:24am UTC](https://discourse.julialang.org/t/a-question-about-my-code/37611 "2020-04-15T06:24:07Z")

</div>

is that right? but Error when entering data it shows Obj(\[10 1 -1;2 6 1\],\[10 1 -1;2 6 1\],20,\[-2; -11\]) ERROR: UndefVarError: X not defined Stacktrace: \[1\] macro expansion at C:\\Users\\dell.juliapro\\JuliaPro\_v1.3.…

---

## [DifferentialEquations.jl inplace implicit ODE problem](https://discourse.julialang.org/t/differentialequations-jl-inplace-implicit-ode-problem/37495)

<div class="topic-metadata">

**Author:** [@santiagobadia](https://discourse.julialang.org/u/santiagobadia)\
**Replies:** 4\
**Last updated:** [April 15, 2020, 5:12am UTC](https://discourse.julialang.org/t/differentialequations-jl-inplace-implicit-ode-problem/37495 "2020-04-15T05:12:24Z")

</div>

I am trying to combine the ODE solvers in DifferentialEquations.jl with the PDE solvers in the Gridap.jl library. It is mandatory for our applications to use the inplace version of the DifferentialEquations.jl package. …

---

## [\[ANN\] PrettyTables.jl v0.9.0 - Breaking release, please read](https://discourse.julialang.org/t/ann-prettytables-jl-v0-9-0-breaking-release-please-read/37538)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 4\
**Last updated:** [April 15, 2020, 4:05am UTC](https://discourse.julialang.org/t/ann-prettytables-jl-v0-9-0-breaking-release-please-read/37538 "2020-04-15T04:05:23Z")

</div>

Hi! I have just tagged a new release of PrettyTables.jl - it should be registered soon. This modifies a lot of things and, unfortunately, breaks a lot of things… This was necessary because the package became much bigger…

---

## [Computation with huge numbers: BigInt, BigFloat etc](https://discourse.julialang.org/t/computation-with-huge-numbers-bigint-bigfloat-etc/37591)

<div class="topic-metadata">

**Author:** [@harven](https://discourse.julialang.org/u/harven)\
**Replies:** 2\
**Last updated:** [April 15, 2020, 1:16am UTC](https://discourse.julialang.org/t/computation-with-huge-numbers-bigint-bigfloat-etc/37591 "2020-04-15T01:16:45Z")

</div>

I am trying to compute the number binomial(100,50)/2^100, among others. The following code gives an explicit rational value of type Rational{BigInt} for that number. julia\> using Combinatorics julia\> binomial(big(100)…

---

## [Why is this code not working?](https://discourse.julialang.org/t/why-is-this-code-not-working/37523)

<div class="topic-metadata">

**Author:** [@Nimpa](https://discourse.julialang.org/u/Nimpa)\
**Replies:** 10\
**Last updated:** [April 15, 2020, 12:32am UTC](https://discourse.julialang.org/t/why-is-this-code-not-working/37523 "2020-04-15T00:32:53Z")

</div>

The function below is to calculate the fibonacci sequence using get! but i don’t understand why it is not working. global fib\_cache = Dict{BigInt, BigInt}(0 =\> 0, 1 =\> 1) function fib(n::Integer) global fib\_cache get…

---

## [Function Problem](https://discourse.julialang.org/t/function-problem/37596)

<div class="topic-metadata">

**Author:** [@A.U.M](https://discourse.julialang.org/u/A.U.M)\
**Replies:** 6\
**Last updated:** [April 15, 2020, 12:27am UTC](https://discourse.julialang.org/t/function-problem/37596 "2020-04-15T00:27:15Z")

</div>

Sorry I am new in Julia , This is my Fibonacci numbers function : \> global fib\_cache = Dict{BigInt, BigInt}(0 =\> 0, 1 =\> 1) \> function fib(n::Integer) \> global fib\_cache \> if haskey(fib\_cache, n) \> fib\_cache\[n\] \> else \> …

---

## [How to make a global constant thread local?](https://discourse.julialang.org/t/how-to-make-a-global-constant-thread-local/37595)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 1\
**Last updated:** [April 14, 2020, 11:17pm UTC](https://discourse.julialang.org/t/how-to-make-a-global-constant-thread-local/37595 "2020-04-14T23:17:40Z")

</div>

To make my code thread-safe, I am making some constant thread local. However, in the following package example module Foo const bar = zeros(Threads.nthreads()) end the length of bar will be stuck at JULIA\_NUM\_THREADS …

---

## [Record from an online audio stream](https://discourse.julialang.org/t/record-from-an-online-audio-stream/37385)

<div class="topic-metadata">

**Author:** [@Martijn-R](https://discourse.julialang.org/u/Martijn-R)\
**Replies:** 7\
**Last updated:** [April 14, 2020, 11:09pm UTC](https://discourse.julialang.org/t/record-from-an-online-audio-stream/37385 "2020-04-14T23:09:18Z")

</div>

I would like to record a few seconds of audio from an online .mp3 or .aac stream, for example from http://ais.absoluteradio.co.uk/absoluteclassicrock.mp3. I tried several ways: from within a terminal window, with R and …

---

## [How to solve this problem with T](https://discourse.julialang.org/t/how-to-solve-this-problem-with-t/37585)

<div class="topic-metadata">

**Author:** [@11129](https://discourse.julialang.org/u/11129)\
**Replies:** 2\
**Last updated:** [April 14, 2020, 9:52pm UTC](https://discourse.julialang.org/t/how-to-solve-this-problem-with-t/37585 "2020-04-14T21:52:30Z")

</div>

Dear everyone, This is the same problem I cannot step over, I have tried to fix this problem the whole afternoon I cannot go to next step… What T is …

---

## [Eigensolver for Complex Companion Matrix](https://discourse.julialang.org/t/eigensolver-for-complex-companion-matrix/37587)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 10\
**Last updated:** [April 14, 2020, 9:22pm UTC](https://discourse.julialang.org/t/eigensolver-for-complex-companion-matrix/37587 "2020-04-14T21:22:01Z")

</div>

I’m wondering if there is any Julia eigensolver specialized for complex companion matrices of moderate size, say up to 30x30. Thanks, -Arrigo

---

## [Specific help regarding allocations and performance](https://discourse.julialang.org/t/specific-help-regarding-allocations-and-performance/37572)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 15\
**Last updated:** [April 14, 2020, 8:42pm UTC](https://discourse.julialang.org/t/specific-help-regarding-allocations-and-performance/37572 "2020-04-14T20:42:20Z")

</div>

Hello! I am working on a tool in Julia which allows one to redistribute an initial set of particles inside a profile based on SPH (smoothed particle hydrodynamics), to get a more uniform distribution. The algorithm is b…

---

## [Package name suggestion](https://discourse.julialang.org/t/package-name-suggestion/37557)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 10\
**Last updated:** [April 14, 2020, 8:18pm UTC](https://discourse.julialang.org/t/package-name-suggestion/37557 "2020-04-14T20:18:21Z")

</div>

Hi, I am the developper of PseudoArcLengthContinuation.jl and based on several discourse posts ( most notably this one), it appears that the name of my package is not very well chosen. More precisely, people seem surpri…

---

## [Convert nested struct or mutable struct to array of Float64](https://discourse.julialang.org/t/convert-nested-struct-or-mutable-struct-to-array-of-float64/37506)

<div class="topic-metadata">

**Author:** [@Patrick\_Chow](https://discourse.julialang.org/u/Patrick_Chow)\
**Replies:** 13\
**Last updated:** [April 14, 2020, 8:16pm UTC](https://discourse.julialang.org/t/convert-nested-struct-or-mutable-struct-to-array-of-float64/37506 "2020-04-14T20:16:13Z")

</div>

Hi Guys, I have some nested struct like this, all the field is either another struct, or Float64. struct A A1::Float64 A2::Float64 end Struct B B1::A B2::Float64 end Now, I would like to convert them int…

---

## [Startup.jl having no effect](https://discourse.julialang.org/t/startup-jl-having-no-effect/37576)

<div class="topic-metadata">

**Author:** [@ArborealAnole](https://discourse.julialang.org/u/ArborealAnole)\
**Replies:** 0\
**Last updated:** [April 14, 2020, 5:41pm UTC](https://discourse.julialang.org/t/startup-jl-having-no-effect/37576 "2020-04-14T17:41:52Z")

</div>

I’m using Julia Pro 1.4.0 on Arch Linux. I want to import packages and write a text message to the console (for testing) when I start the REPL. But neither happen. The following is my ~/.julia/config/startup.jl and ~/.ju…

---

## [Is it possible to select the Julia version in an environmet?](https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567)

<div class="topic-metadata">

**Author:** [@angelv](https://discourse.julialang.org/u/angelv)\
**Replies:** 4\
**Last updated:** [April 14, 2020, 4:52pm UTC](https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567 "2020-04-14T16:52:14Z")

</div>

Hi, I’m starting to get familiar with environments while following the course on Parallel Computing with Julia in JuliaAcademy. The repository for that course comes with Project.toml and Manifest.toml files to specify t…

---

## [Difference between Base and Core](https://discourse.julialang.org/t/difference-between-base-and-core/37426)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 2\
**Last updated:** [April 14, 2020, 4:31pm UTC](https://discourse.julialang.org/t/difference-between-base-and-core/37426 "2020-04-14T16:31:31Z")

</div>

The Base and Core modules are essential to the Julia run time… but how are the different? e.g. I can see Complex being defined in Base but Int types are defined in Core… Further, it seems that everything is “exposed” i…

---

## [Fixing a variable](https://discourse.julialang.org/t/fixing-a-variable/37569)

<div class="topic-metadata">

**Author:** [@Smith](https://discourse.julialang.org/u/Smith)\
**Replies:** 2\
**Last updated:** [April 14, 2020, 4:17pm UTC](https://discourse.julialang.org/t/fixing-a-variable/37569 "2020-04-14T16:17:49Z")

</div>

Here it is mentioned fixing a variable is better than adding a constraint: Does JuMP.fix and setting bounds on variables work with vectors or loop is necessary? I have only managed it with a loop: for i = 15:25 JuMP.fi…

---

## [Using isdefined to check where a function is defined](https://discourse.julialang.org/t/using-isdefined-to-check-where-a-function-is-defined/37536)

<div class="topic-metadata">

**Author:** [@barche](https://discourse.julialang.org/u/barche)\
**Replies:** 15\
**Last updated:** [April 14, 2020, 3:17pm UTC](https://discourse.julialang.org/t/using-isdefined-to-check-where-a-function-is-defined/37536 "2020-04-14T15:17:12Z")

</div>

Hi all, In CxxWrap, there is a check to determine if a function declaration should be prepended with the module, for example to extend functions in Base, using isdefined. However, when creating functions that have the s…

---

## [@timed to plot the time and memory consumption](https://discourse.julialang.org/t/timed-to-plot-the-time-and-memory-consumption/37477)

<div class="topic-metadata">

**Author:** [@A.U.M](https://discourse.julialang.org/u/A.U.M)\
**Replies:** 6\
**Last updated:** [April 14, 2020, 2:58pm UTC](https://discourse.julialang.org/t/timed-to-plot-the-time-and-memory-consumption/37477 "2020-04-14T14:58:37Z")

</div>

Hello, I am new to Julia. I have implemented different type of functions ( Fib 1 , Fib2, … etc ) to calculate Fibonacci numbers in different ways. How can I Use the macro @timed to plot the time and memory consumption o…

---

## [Gadfly Boxplot w/o DataFrames](https://discourse.julialang.org/t/gadfly-boxplot-w-o-dataframes/37533)

<div class="topic-metadata">

**Author:** [@Andre\_Mello](https://discourse.julialang.org/u/Andre_Mello)\
**Replies:** 2\
**Last updated:** [April 14, 2020, 2:54pm UTC](https://discourse.julialang.org/t/gadfly-boxplot-w-o-dataframes/37533 "2020-04-14T14:54:20Z")

</div>

I was giving Gadfly a shot, plotting some simple data to see how it works. Most of what I tried works fine and the Package seems amazing. However, I tried testing its boxplot functionality and ran into this issue. p = p…

---

## [Unknown error with norm() function](https://discourse.julialang.org/t/unknown-error-with-norm-function/36225)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 2\
**Last updated:** [April 14, 2020, 2:15pm UTC](https://discourse.julialang.org/t/unknown-error-with-norm-function/36225 "2020-04-14T14:15:32Z")

</div>

I am having trouble with using the basic norm() function after having loaded using LinearAlgebra; In the lines below, Phi is a matrix created in the middle of a larger program. julia\> typeof(Phi) Array{Float64,2} julia\> …

---

## [Hashes change whenever package is pre-compiled](https://discourse.julialang.org/t/hashes-change-whenever-package-is-pre-compiled/37555)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 12\
**Last updated:** [April 14, 2020, 12:49pm UTC](https://discourse.julialang.org/t/hashes-change-whenever-package-is-pre-compiled/37555 "2020-04-14T12:49:13Z")

</div>

I have a very simple package I am developing, say defined like this: module MyPkg struct A a::Int end end # module Now in a Julia session, I import this package, and compute a hash of an object: julia\> using MyPkg …

---

## [Design and performance issues with function generator macro](https://discourse.julialang.org/t/design-and-performance-issues-with-function-generator-macro/37553)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 3\
**Last updated:** [April 14, 2020, 11:31am UTC](https://discourse.julialang.org/t/design-and-performance-issues-with-function-generator-macro/37553 "2020-04-14T11:31:37Z")

</div>

I am having some design and performance issues with a helper macro which creates (binary) parsers for structs. Let me add a bit of background in case of a totally wrong approach: I need to parse binary data and the stru…

---

## [Contour plot for 2d kernel density](https://discourse.julialang.org/t/contour-plot-for-2d-kernel-density/37223)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 9\
**Last updated:** [April 14, 2020, 9:57am UTC](https://discourse.julialang.org/t/contour-plot-for-2d-kernel-density/37223 "2020-04-14T09:57:45Z")

</div>

I need to visualize about 10^5 points on a 2D scatterplot, with four categories. What I am currently doing is fitting a kernel density using KernelDensity.kde, making a rectangular grid, finding the contours with Coun…

---

## [Problem cloning registry in 1.3.1](https://discourse.julialang.org/t/problem-cloning-registry-in-1-3-1/33412)

<div class="topic-metadata">

**Author:** [@Paulo\_Jabardo](https://discourse.julialang.org/u/Paulo_Jabardo)\
**Replies:** 3\
**Last updated:** [April 14, 2020, 9:24am UTC](https://discourse.julialang.org/t/problem-cloning-registry-in-1-3-1/33412 "2020-04-14T09:24:09Z")

</div>

I am on Ubuntu 19.10 and using official Julia 1.3.1 binary tarballs. The problem is: (v1.3) pkg\> add IJulia Cloning default registries into \`~/.julia\` Cloning registry from "https://github.com/JuliaRegistries/Gen…

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

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