# Latest

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

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

**Page:** 1601

---

## [Easier way to feed stdin to external program and fetch stdout?](https://discourse.julialang.org/t/easier-way-to-feed-stdin-to-external-program-and-fetch-stdout/48503)

<div class="topic-metadata">

**Author:** [@matklad](https://discourse.julialang.org/u/matklad)\
**Replies:** 1\
**Last updated:** [October 16, 2020, 5:17pm UTC](https://discourse.julialang.org/t/easier-way-to-feed-stdin-to-external-program-and-fetch-stdout/48503 "2020-10-16T17:17:09Z")

</div>

Let’s say I have n external program which reads input from stdin and writes it to stdout. What would be the easiest way to feed the given string to the program and get the result back? I think I can open the cmd for rea…

---

## [Error occurs only when testing/debugging](https://discourse.julialang.org/t/error-occurs-only-when-testing-debugging/48446)

<div class="topic-metadata">

**Author:** [@Abram\_Demski](https://discourse.julialang.org/u/Abram_Demski)\
**Replies:** 2\
**Last updated:** [October 16, 2020, 5:11pm UTC](https://discourse.julialang.org/t/error-occurs-only-when-testing-debugging/48446 "2020-10-16T17:11:14Z")

</div>

As mentioned more briefly in Tests Not Giving Good Error Info, I’m encountering a strange phantom error which only occurs when running tests or stepping thru via the debugger – when I just run the code normally, no error…

---

## [Net present value (npv function)](https://discourse.julialang.org/t/net-present-value-npv-function/48487)

<div class="topic-metadata">

**Author:** [@Ping](https://discourse.julialang.org/u/Ping)\
**Replies:** 5\
**Last updated:** [October 16, 2020, 4:40pm UTC](https://discourse.julialang.org/t/net-present-value-npv-function/48487 "2020-10-16T16:40:07Z")

</div>

I have been trying to use npv to calculate the net present value. The interest rate and cashflows are from a row of matrix, look like this: npv(norm(IRR\_adj\[:,1\]),nb,AssetsCF\[:,1\]) where IRR\_add is 1×1185 Array{Float64…

---

## [How to learn how to solve equations in Julia 1.0?](https://discourse.julialang.org/t/how-to-learn-how-to-solve-equations-in-julia-1-0/15738)

<div class="topic-metadata">

**Author:** [@aalexandersson](https://discourse.julialang.org/u/aalexandersson)\
**Replies:** 7\
**Last updated:** [October 16, 2020, 4:19pm UTC](https://discourse.julialang.org/t/how-to-learn-how-to-solve-equations-in-julia-1-0/15738 "2020-10-16T16:19:29Z")

</div>

How to learn how to solve equations in Julia 1.0? Because I am a beginner, I am only interested in relatively simple problems such as basic optimization. I found a book that seemed relevant but it predates Julia 1.0: Jul…

---

## [Make subplots larger in Plots.jl](https://discourse.julialang.org/t/make-subplots-larger-in-plots-jl/48488)

<div class="topic-metadata">

**Author:** [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Replies:** 3\
**Last updated:** [October 16, 2020, 3:45pm UTC](https://discourse.julialang.org/t/make-subplots-larger-in-plots-jl/48488 "2020-10-16T15:45:59Z")

</div>

I generate a group of subplots by plot(\<plots\>..., layout=\<number of plots\>) Is there a way to set make the height of those plots larger without setting an absolute size? (I’m working from a notebook)

---

## [Github actions CI fails saying my package is not installed, but only on Windows and Mac](https://discourse.julialang.org/t/github-actions-ci-fails-saying-my-package-is-not-installed-but-only-on-windows-and-mac/48457)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 9\
**Last updated:** [October 16, 2020, 3:40pm UTC](https://discourse.julialang.org/t/github-actions-ci-fails-saying-my-package-is-not-installed-but-only-on-windows-and-mac/48457 "2020-10-16T15:40:05Z")

</div>

My package is not registered yet (it is a new package, which I registered for the first time yesterday). The CI action runs without errors for Ubuntu, but on Windows and Mac I am getting these errors: On Mac: ERROR: L…

---

## [Documenter.jl - how to add package](https://discourse.julialang.org/t/documenter-jl-how-to-add-package/48496)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [October 16, 2020, 3:38pm UTC](https://discourse.julialang.org/t/documenter-jl-how-to-add-package/48496 "2020-10-16T15:38:33Z")

</div>

I’m developing a package called UnitfulAstrodynamics, which is hosted on GitHub. I’m using Documenter.jl for documentation, and I have a docs/ folder at the top level of the package. The GitHub action julia-actions/juli…

---

## [Out of memory error](https://discourse.julialang.org/t/out-of-memory-error/48475)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 7\
**Last updated:** [October 16, 2020, 3:24pm UTC](https://discourse.julialang.org/t/out-of-memory-error/48475 "2020-10-16T15:24:29Z")

</div>

I am solving a system of linear algebraic equations with a sparse complex matrix in a loop. At each pass through the loop I form the sparse complex matrix out of real sparse matrices. First pass through the loop is okay,…

---

## [Structs with nested parametric types](https://discourse.julialang.org/t/structs-with-nested-parametric-types/48448)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 2\
**Last updated:** [October 16, 2020, 3:22pm UTC](https://discourse.julialang.org/t/structs-with-nested-parametric-types/48448 "2020-10-16T15:22:22Z")

</div>

I’m trying to create a struct with parametric types. I want the struct to have a field of type Array{U{F}}, where U\<:Unitful.Length, F\<:AbstractFloat. Is there any way to have nested parametric types for structs in Julia…

---

## [How can I check if a function is always positive?](https://discourse.julialang.org/t/how-can-i-check-if-a-function-is-always-positive/48405)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 14\
**Last updated:** [October 16, 2020, 3:15pm UTC](https://discourse.julialang.org/t/how-can-i-check-if-a-function-is-always-positive/48405 "2020-10-16T15:15:35Z")

</div>

Suppose I have a user-defined mathematical function, say f(x::Real) = x\*exp(x) I would like to check if f(x) \> 0 for all x \\in \[x\_l, x\_u\] \\subset \\mathbb{R}. The best ideas I have are either x = xₗ:0.01:xᵤ if any(f.(…

---

## [Compiling kernel resulted in invalid LLVM IR Reason: unsupported dynamic function invocation](https://discourse.julialang.org/t/compiling-kernel-resulted-in-invalid-llvm-ir-reason-unsupported-dynamic-function-invocation/48452)

<div class="topic-metadata">

**Author:** [@FelixBenning](https://discourse.julialang.org/u/FelixBenning)\
**Replies:** 11\
**Last updated:** [October 16, 2020, 2:58pm UTC](https://discourse.julialang.org/t/compiling-kernel-resulted-in-invalid-llvm-ir-reason-unsupported-dynamic-function-invocation/48452 "2020-10-16T14:58:03Z")

</div>

So I am trying to write an extreme value/ order statistics package for GPUs. The idea is, that getting the maximum of a large number of random variables multiple times in order to get a max distribution should lend itsel…

---

## ["using" as a function?](https://discourse.julialang.org/t/using-as-a-function/48462)

<div class="topic-metadata">

**Author:** [@RodBiren](https://discourse.julialang.org/u/RodBiren)\
**Replies:** 12\
**Last updated:** [October 16, 2020, 1:32pm UTC](https://discourse.julialang.org/t/using-as-a-function/48462 "2020-10-16T13:32:49Z")

</div>

I am messing around with Pluto and decided I would like a shorter way of importing libraries. This question is sort of two fold. How can I dynamically import Modules using a macro or something else? And why is using a ke…

---

## [Vector of tuples vs Matrix type](https://discourse.julialang.org/t/vector-of-tuples-vs-matrix-type/48484)

<div class="topic-metadata">

**Author:** [@bcsj](https://discourse.julialang.org/u/bcsj)\
**Replies:** 2\
**Last updated:** [October 16, 2020, 12:03pm UTC](https://discourse.julialang.org/t/vector-of-tuples-vs-matrix-type/48484 "2020-10-16T12:03:21Z")

</div>

I’m pretty new to Julia and was wondering what the preferred practice for storing something like a bunch of coordinates, mesh triangles or graph edges? Say I want to store edges in a graph. The vertices are labelled by …

---

## [Broken Base.show method](https://discourse.julialang.org/t/broken-base-show-method/48453)

<div class="topic-metadata">

**Author:** [@racinmat](https://discourse.julialang.org/u/racinmat)\
**Replies:** 7\
**Last updated:** [October 16, 2020, 11:18am UTC](https://discourse.julialang.org/t/broken-base-show-method/48453 "2020-10-16T11:18:13Z")

</div>

I’m working on function that either shows full types or not based on some variable. I encountered weird bug I can’t figure out because the function is not behaving the same when running it and when debugging it. The fu…

---

## [What is the best future-proof way to check which function raised a MethodError?](https://discourse.julialang.org/t/what-is-the-best-future-proof-way-to-check-which-function-raised-a-methoderror/48354)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [October 16, 2020, 11:04am UTC](https://discourse.julialang.org/t/what-is-the-best-future-proof-way-to-check-which-function-raised-a-methoderror/48354 "2020-10-16T11:04:59Z")

</div>

I want to ensure that the MethodError is raised by by a function in my package, and not downstream. For example here’s one way: julia\> e = MethodError(sin, "a") MethodError(sin, "a", 0xffffffffffffffff) julia\> e.f == …

---

## [Annoying JuMP way to deal with shadow prices](https://discourse.julialang.org/t/annoying-jump-way-to-deal-with-shadow-prices/48420)

<div class="topic-metadata">

**Author:** [@jovansam](https://discourse.julialang.org/u/jovansam)\
**Replies:** 2\
**Last updated:** [October 16, 2020, 10:44am UTC](https://discourse.julialang.org/t/annoying-jump-way-to-deal-with-shadow-prices/48420 "2020-10-16T10:44:10Z")

</div>

JuMP has annoying shadow price behavior. First raised here, the issue also matters in the presence of non-linear models/constraints in JuMP. The behavior is not there in GAMS. My model is an economic growth model. Took …

---

## [Assistance with Transformers.jl](https://discourse.julialang.org/t/assistance-with-transformers-jl/48483)

<div class="topic-metadata">

**Author:** [@Stantin\_Siebritz](https://discourse.julialang.org/u/Stantin_Siebritz)\
**Replies:** 0\
**Last updated:** [October 16, 2020, 9:43am UTC](https://discourse.julialang.org/t/assistance-with-transformers-jl/48483 "2020-10-16T09:43:33Z")

</div>

Hi I would like to create an implementation of the Transformer NLP architecture, more specifically I am trying to implement a BERT Summarizer. I have been using the Transformer.jl (v 0.1.7) package and have followed the…

---

## [Scope in reduce](https://discourse.julialang.org/t/scope-in-reduce/48482)

<div class="topic-metadata">

**Author:** [@alligatorme](https://discourse.julialang.org/u/alligatorme)\
**Replies:** 1\
**Last updated:** [October 16, 2020, 9:24am UTC](https://discourse.julialang.org/t/scope-in-reduce/48482 "2020-10-16T09:24:25Z")

</div>

It sesms that the global variable is not avaliable in function of reduce’s first augument. a=range(1,10,step=1) c=2 function ad(a,b) c=c\*c return a+b+c end reduce(ad,a) the result shows: UndefVarError: c not d…

---

## [Can you remove an element from a multidimensal array?](https://discourse.julialang.org/t/can-you-remove-an-element-from-a-multidimensal-array/48386)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 6\
**Last updated:** [October 16, 2020, 9:14am UTC](https://discourse.julialang.org/t/can-you-remove-an-element-from-a-multidimensal-array/48386 "2020-10-16T09:14:02Z")

</div>

Suppose if I had a 2 dimensional array: a = Int32\[1 2 3 4; 5 6 7 8; 9 10 11 12\] If I wanted to delete the first element in the second row, can I do that? I attempted to search for myself and I found this Stack Overflo…

---

## [Define a distribution from a given distribution](https://discourse.julialang.org/t/define-a-distribution-from-a-given-distribution/48220)

<div class="topic-metadata">

**Author:** [@mcql](https://discourse.julialang.org/u/mcql)\
**Replies:** 12\
**Last updated:** [October 16, 2020, 8:55am UTC](https://discourse.julialang.org/t/define-a-distribution-from-a-given-distribution/48220 "2020-10-16T08:55:23Z")

</div>

Hello, I would like to define two distributions: p = Uniform(0,1) p2 = 1-p give me typrerror. ERROR: MethodError: no method matching -(::Int64, ::Uniform{Float64}) I also cannot sum two distributions: c = Normal(…

---

## [Makie Text Box/File Selection GUI](https://discourse.julialang.org/t/makie-text-box-file-selection-gui/48472)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 2\
**Last updated:** [October 16, 2020, 8:21am UTC](https://discourse.julialang.org/t/makie-text-box-file-selection-gui/48472 "2020-10-16T08:21:07Z")

</div>

I have a Makie plot with interactive slider bars. Wondering what’s the best way to advance the components that can be added to this graphic. How do I make a Dial for example instead of a linear slide? But that’s not e…

---

## [Ping Jorge Alberto Vieyra Salas](https://discourse.julialang.org/t/ping-jorge-alberto-vieyra-salas/48480)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [October 16, 2020, 7:30am UTC](https://discourse.julialang.org/t/ping-jorge-alberto-vieyra-salas/48480 "2020-10-16T07:30:48Z")

</div>

Please send me a direct message?

---

## [Suggestions for Projects that add features to Julia](https://discourse.julialang.org/t/suggestions-for-projects-that-add-features-to-julia/48237)

<div class="topic-metadata">

**Author:** [@Ashutosh\_Pandey](https://discourse.julialang.org/u/Ashutosh_Pandey)\
**Replies:** 16\
**Last updated:** [October 16, 2020, 7:15am UTC](https://discourse.julialang.org/t/suggestions-for-projects-that-add-features-to-julia/48237 "2020-10-16T07:15:49Z")

</div>

Hello Julia community! My friend and I are final year undergraduate students. We have an interest in compilers/interpreters and we’ve done some work related to Clang/LLVM in the past. For our final year undergraduate p…

---

## [Doctests and array printing](https://discourse.julialang.org/t/doctests-and-array-printing/48477)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 3\
**Last updated:** [October 16, 2020, 6:22am UTC](https://discourse.julialang.org/t/doctests-and-array-printing/48477 "2020-10-16T06:22:51Z")

</div>

Printing of arrays changed recently: julia\> \[1\] # 1.5 1-element Array{Int64,1}: 1 julia\> \[1\] # master 1-element Vector{Int64}: 1 This breaks quite some doctests. I would like to have my doctests pass on 1.x and mast…

---

## [ERROR: MethodError: no method matching iterate(::Symbol)](https://discourse.julialang.org/t/error-methoderror-no-method-matching-iterate-symbol/47482)

<div class="topic-metadata">

**Author:** [@sz1992](https://discourse.julialang.org/u/sz1992)\
**Replies:** 5\
**Last updated:** [September 29, 2020, 1:28pm UTC](https://discourse.julialang.org/t/error-methoderror-no-method-matching-iterate-symbol/47482 "2020-09-29T13:28:06Z")

</div>

Hi, if you try to iterate over ::Symbol you get an error: MWE: for i in :c @show i end ERROR: MethodError: no method matching iterate(::Symbol) however it works fine with Int: for i in 5 @show i end i = 5 note also…

---

## [Reading individual slices of a TIFF stack (aka multipage TIFF)](https://discourse.julialang.org/t/reading-individual-slices-of-a-tiff-stack-aka-multipage-tiff/12772)

<div class="topic-metadata">

**Author:** [@tross](https://discourse.julialang.org/u/tross)\
**Replies:** 8\
**Last updated:** [October 16, 2020, 2:50am UTC](https://discourse.julialang.org/t/reading-individual-slices-of-a-tiff-stack-aka-multipage-tiff/12772 "2020-10-16T02:50:14Z")

</div>

Hello, I am having trouble finding a way to access individual slices of a TIFF stack. I have a bunch of large TIFF stacks that are all too big to load into memory. In Matlab you can load a specific index of a TIFF stack…

---

## [Too many precompilations](https://discourse.julialang.org/t/too-many-precompilations/48416)

<div class="topic-metadata">

**Author:** [@kogad](https://discourse.julialang.org/u/kogad)\
**Replies:** 8\
**Last updated:** [October 16, 2020, 2:02am UTC](https://discourse.julialang.org/t/too-many-precompilations/48416 "2020-10-16T02:02:53Z")

</div>

Hi all, I am implementing genetic proggraming (GP) in julia. In GP, I need to evaluate mathematical expressions represented by tree structures. This is extracted and simplified code relating to the evaluation. struct …

---

## [Problem with CPLEX variable types using JuMP](https://discourse.julialang.org/t/problem-with-cplex-variable-types-using-jump/48415)

<div class="topic-metadata">

**Author:** [@arkanver](https://discourse.julialang.org/u/arkanver)\
**Replies:** 5\
**Last updated:** [October 15, 2020, 9:02pm UTC](https://discourse.julialang.org/t/problem-with-cplex-variable-types-using-jump/48415 "2020-10-15T21:02:30Z")

</div>

Hello all, I am trying to solve a quadratic optimization problem using CPLEX through JuMP. It is a continuous relaxation, hence all of my variables are continuous (with box constraints). After dealing with convexity is…

---

## [How change Plots default color palette](https://discourse.julialang.org/t/how-change-plots-default-color-palette/48422)

<div class="topic-metadata">

**Author:** [@BaronvonderHeyden](https://discourse.julialang.org/u/BaronvonderHeyden)\
**Replies:** 2\
**Last updated:** [October 15, 2020, 10:27pm UTC](https://discourse.julialang.org/t/how-change-plots-default-color-palette/48422 "2020-10-15T22:27:19Z")

</div>

Hello, I know that Plots assigns line colors from a default color palette, but I cannot figure out how to change this palette… Could someone please tell me how thats done? Specifically, I would like to replace it by Da…

---

## [Julia + Plotly Announcement: Dash for Julia!](https://discourse.julialang.org/t/julia-plotly-announcement-dash-for-julia/48318)

<div class="topic-metadata">

**Author:** [@jingningzhang1](https://discourse.julialang.org/u/jingningzhang1)\
**Replies:** 1\
**Last updated:** [October 15, 2020, 9:54pm UTC](https://discourse.julialang.org/t/julia-plotly-announcement-dash-for-julia/48318 "2020-10-15T21:54:47Z")

</div>

Hi everyone! I am the Digital Marketing Manager at Plotly, a fellow OSS-core company. I wanted to share some exciting news…The founders of Julia and Plotly’s Dash have come together to launch Dash for Julia! Dash is an …

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

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