# Latest

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

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

**Page:** 1461

---

## [Fused broadcast cannot guess eltype](https://discourse.julialang.org/t/fused-broadcast-cannot-guess-eltype/57118)

<div class="topic-metadata">

**Author:** [@abraunst](https://discourse.julialang.org/u/abraunst)\
**Replies:** 1\
**Last updated:** [March 14, 2021, 12:35pm UTC](https://discourse.julialang.org/t/fused-broadcast-cannot-guess-eltype/57118 "2021-03-14T12:35:18Z")

</div>

x = sprand(10,10,0.1) z = Float64.(abs.(x)) gives MethodError: no method matching zero(::Type{Any}) Closest candidates are: zero(::Type{Union{Missing, T}}) where T at missing.jl:105 zero(!Matched::Union{Type{P}, P}…

---

## [Help: Maximum entropy distributions with inequality constraints](https://discourse.julialang.org/t/help-maximum-entropy-distributions-with-inequality-constraints/57093)

<div class="topic-metadata">

**Author:** [@josePereiro](https://discourse.julialang.org/u/josePereiro)\
**Replies:** 3\
**Last updated:** [March 14, 2021, 11:11am UTC](https://discourse.julialang.org/t/help-maximum-entropy-distributions-with-inequality-constraints/57093 "2021-03-14T11:11:36Z")

</div>

Hi, newe question, I had been using the basic Jayne Maximum Entropy Principle for choosing some probability distribution, P, subject to some equality constraints {\\displaystyle \\sum \_{i=1}^{n} P(x\_{i})f\_{k}(x\_{i}) = F\_{…

---

## [How to set the size of images display in Plots window](https://discourse.julialang.org/t/how-to-set-the-size-of-images-display-in-plots-window/57049)

<div class="topic-metadata">

**Author:** [@joeynelson](https://discourse.julialang.org/u/joeynelson)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 10:30pm UTC](https://discourse.julialang.org/t/how-to-set-the-size-of-images-display-in-plots-window/57049 "2021-03-13T22:30:13Z")

</div>

I’m doing some working with images using the Images package, and when larger images are displayed they are scaled smaller than the actual size. How do I change this? img = Gray.(rand(1200,1200))

---

## [Vector - Matrix - Vector multiplication](https://discourse.julialang.org/t/vector-matrix-vector-multiplication/57087)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 19\
**Last updated:** [March 14, 2021, 10:14am UTC](https://discourse.julialang.org/t/vector-matrix-vector-multiplication/57087 "2021-03-14T10:14:19Z")

</div>

I want to calculate xMy, where M is a complex matrix given by M = (AB-CD)’ \* (AB-BC), and A,B,C,D are complex or real matrices, not of the same dimension, i.e. in general not square matrices. Some example matrices are gi…

---

## [DataFrames precompiling error](https://discourse.julialang.org/t/dataframes-precompiling-error/56947)

<div class="topic-metadata">

**Author:** [@petyabaa](https://discourse.julialang.org/u/petyabaa)\
**Replies:** 11\
**Last updated:** [March 14, 2021, 9:23am UTC](https://discourse.julialang.org/t/dataframes-precompiling-error/56947 "2021-03-14T09:23:42Z")

</div>

Hi Everyone, I’m new to Julia (and also coding). I started to use 1.5.3 on my ubuntu 18.04. I would like to use DataFrames, but I couldn’t. I tried to use it on 1.6.0rc1, but I’ve got the same troubles. Firstly I added …

---

## [Weird Tuple types that seem like they should be disallowed?](https://discourse.julialang.org/t/weird-tuple-types-that-seem-like-they-should-be-disallowed/57080)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 11\
**Last updated:** [March 14, 2021, 9:14am UTC](https://discourse.julialang.org/t/weird-tuple-types-that-seem-like-they-should-be-disallowed/57080 "2021-03-14T09:14:45Z")

</div>

I noticed that some Tuple types that are parameterized by non-types exist, but seem useless. I wonder if they: May have instances at all? Should be disallowed? Example: \_ \_ \_ \_(\_)\_ |…

---

## [Why do unicode arrows behave unexpectedly for variable names?](https://discourse.julialang.org/t/why-do-unicode-arrows-behave-unexpectedly-for-variable-names/57103)

<div class="topic-metadata">

**Author:** [@rwclutterbuck](https://discourse.julialang.org/u/rwclutterbuck)\
**Replies:** 1\
**Last updated:** [March 14, 2021, 9:10am UTC](https://discourse.julialang.org/t/why-do-unicode-arrows-behave-unexpectedly-for-variable-names/57103 "2021-03-14T09:10:39Z")

</div>

I’m going to keep this short as from what I’ve read on the topic the answer is likely “there’s ambiguity so it is turned off”. I was running in to the problem when doing some programming exercises and noticed that when …

---

## [Will using be deprecated in Julia 2.0?](https://discourse.julialang.org/t/will-using-be-deprecated-in-julia-2-0/57083)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 6\
**Last updated:** [March 14, 2021, 9:02am UTC](https://discourse.julialang.org/t/will-using-be-deprecated-in-julia-2-0/57083 "2021-03-14T09:02:09Z")

</div>

I saw this issue in Julia 2.0 milestone. https://github.com/JuliaLang/julia/issues/39235 I was wondering if using will be deprecated in favor of import in Julia 2.0. If that is the case, I will stop using the using righ…

---

## [Hey julians. I found this one a little tricky to fix. I have a rosenbrock function](https://discourse.julialang.org/t/hey-julians-i-found-this-one-a-little-tricky-to-fix-i-have-a-rosenbrock-function/57110)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 14, 2021, 7:26am UTC](https://discourse.julialang.org/t/hey-julians-i-found-this-one-a-little-tricky-to-fix-i-have-a-rosenbrock-function/57110 "2021-03-14T07:26:01Z")

</div>

Hey julians. I found this one a little tricky to fix. I have a rosenbrock function that takes 2 values and returns 1 value. So I was trying to run this as a comprehension, but I am getting out a (401,401) array, instead …

---

## [Problem with using IJulia](https://discourse.julialang.org/t/problem-with-using-ijulia/57086)

<div class="topic-metadata">

**Author:** [@Francesco-Cerutti](https://discourse.julialang.org/u/Francesco-Cerutti)\
**Replies:** 3\
**Last updated:** [March 14, 2021, 7:05am UTC](https://discourse.julialang.org/t/problem-with-using-ijulia/57086 "2021-03-14T07:05:17Z")

</div>

Hi, i’m new to the community and this is the first time using Julia languege, so i’m at the beginig. My problem is the follow: when I try to use IJulia the system answer me with this message : ERROR: LoadError: IJuli…

---

## [@benchmark resize! : no memory allocation?](https://discourse.julialang.org/t/benchmark-resize-no-memory-allocation/57112)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 5\
**Last updated:** [March 14, 2021, 6:49am UTC](https://discourse.julialang.org/t/benchmark-resize-no-memory-allocation/57112 "2021-03-14T06:49:55Z")

</div>

julia\> using BenchmarkTools julia\> x = zeros(10); julia\> @benchmark resize!($x, 10000) BenchmarkTools.Trial: memory estimate: 0 bytes allocs estimate: 0 -------------- minimum time: 2.499 ns (0.00% GC) …

---

## [sizeof(::Vector{Union{missing,T}}), and hypothetical size](https://discourse.julialang.org/t/sizeof-vector-union-missing-t-and-hypothetical-size/15271)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 12\
**Last updated:** [March 14, 2021, 6:42am UTC](https://discourse.julialang.org/t/sizeof-vector-union-missing-t-and-hypothetical-size/15271 "2021-03-14T06:42:51Z")

</div>

Two (related) questions: julia\> sizeof(vcat(ones(10), fill(missing, 10))) 160 but I expected 20\*9 because of the type tag, what am I missing? v"1.1.0-DEV.298". If I have a type T which is a Union, can I calculat…

---

## [Finding the vertices of a hypercube](https://discourse.julialang.org/t/finding-the-vertices-of-a-hypercube/57078)

<div class="topic-metadata">

**Author:** [@Suresh\_Jeevanandam](https://discourse.julialang.org/u/Suresh_Jeevanandam)\
**Replies:** 8\
**Last updated:** [March 14, 2021, 6:20am UTC](https://discourse.julialang.org/t/finding-the-vertices-of-a-hypercube/57078 "2021-03-14T06:20:48Z")

</div>

I defined a data structure to represent a hypercube. It is defined by the min and max bounds on each dimension. struct HyperCube min\_bounds::Array{Float32} max\_bounds::Array{Float32} end Now, I want to define …

---

## [Number of allocations](https://discourse.julialang.org/t/number-of-allocations/34280)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 1\
**Last updated:** [February 7, 2020, 3:41am UTC](https://discourse.julialang.org/t/number-of-allocations/34280 "2020-02-07T03:41:08Z")

</div>

I have difficulties understanding the number of allocations. In the following: const v1 = \[0, 1\] const v2 = \[1, 2\] fun1(x) = begin a = x .+ v1 return a .\* v2 end fun2(x) = @. (x + v1) \* v2 julia\> @btime fun1(…

---

## [A generic ’XPath’ suitable for YAML?](https://discourse.julialang.org/t/a-generic-xpath-suitable-for-yaml/57109)

<div class="topic-metadata">

**Author:** [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Replies:** 1\
**Last updated:** [March 14, 2021, 3:06am UTC](https://discourse.julialang.org/t/a-generic-xpath-suitable-for-yaml/57109 "2021-03-14T03:06:53Z")

</div>

\_\_\_\_ is toYAML as XPath is to XML? It sort of feels like this functionality is pretty generic, and I’m wondering if some package might help.

---

## [Luxor.jl for saving animated gifs?](https://discourse.julialang.org/t/luxor-jl-for-saving-animated-gifs/57107)

<div class="topic-metadata">

**Author:** [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Replies:** 0\
**Last updated:** [March 14, 2021, 2:46am UTC](https://discourse.julialang.org/t/luxor-jl-for-saving-animated-gifs/57107 "2021-03-14T02:46:52Z")

</div>

I’d like to save the ”Seam carving in action” in https://computationalthinking.mit.edu/Spring21/seam\_carving/ as an animated gif. (The last slider in the notebook.) Would Luxor.jl be a good tool for this?

---

## [Current advice on stacked bar plots with Makie](https://discourse.julialang.org/t/current-advice-on-stacked-bar-plots-with-makie/57095)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 2\
**Last updated:** [March 14, 2021, 1:52am UTC](https://discourse.julialang.org/t/current-advice-on-stacked-bar-plots-with-makie/57095 "2021-03-14T01:52:41Z")

</div>

This functionality used to reside in StatsMakie, but AlgebraOfGraphics doesn’t seem to have it. I also can’t find it in the base Makie docs. In StatsPlots, this would be: julia\> using DataFrames, StatsPlots julia\> df …

---

## [Re-writing a ruby side project into julia to learn](https://discourse.julialang.org/t/re-writing-a-ruby-side-project-into-julia-to-learn/57102)

<div class="topic-metadata">

**Author:** [@sampope](https://discourse.julialang.org/u/sampope)\
**Replies:** 1\
**Last updated:** [March 14, 2021, 1:36am UTC](https://discourse.julialang.org/t/re-writing-a-ruby-side-project-into-julia-to-learn/57102 "2021-03-14T01:36:52Z")

</div>

I have a few side projects which are running fine, but never let stability get in the way of learning a new language! I’ve been using julia for two weeks now and I figure an easy walk into learning more is to port the pr…

---

## [Why is getindex not implemented for Iterators.ProductIterator?](https://discourse.julialang.org/t/why-is-getindex-not-implemented-for-iterators-productiterator/57065)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 16\
**Last updated:** [March 14, 2021, 12:58am UTC](https://discourse.julialang.org/t/why-is-getindex-not-implemented-for-iterators-productiterator/57065 "2021-03-14T00:58:50Z")

</div>

I find this behavior strange: s = Iterators.product(1:9, 10:19) c = collect(s) c\[5\] # works: (5, 10) s\[5\] # doesn't work ERROR: MethodError: no method matching getindex(::Base.Iterators.ProductIterator{Tuple{UnitRange{…

---

## [Alternative unit systems with Unitful.jl](https://discourse.julialang.org/t/alternative-unit-systems-with-unitful-jl/55359)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 14\
**Last updated:** [March 14, 2021, 12:52am UTC](https://discourse.julialang.org/t/alternative-unit-systems-with-unitful-jl/55359 "2021-03-14T00:52:36Z")

</div>

The docs for Unitful.jl describe how the package can be extended by defining new units and new unphysical dimensions. But there is no information about the correct procedure when one needs to alter the base dimensions an…

---

## [Display SVG in Jupyter notebook](https://discourse.julialang.org/t/display-svg-in-jupyter-notebook/3475)

<div class="topic-metadata">

**Author:** [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Replies:** 2\
**Last updated:** [March 13, 2021, 10:50pm UTC](https://discourse.julialang.org/t/display-svg-in-jupyter-notebook/3475 "2021-03-13T22:50:37Z")

</div>

I forgot how to do this. I have an SVG image in /tmp/t.svg and I want to display it in a Jupyter notebook. But as a graphic, not like this: I tried the obvious display(load("/tmp/t.svg")) but no luck: FileIO.File…

---

## [\[ANN\] IonCLI: your package manager and more in terminal](https://discourse.julialang.org/t/ann-ioncli-your-package-manager-and-more-in-terminal/44946)

<div class="topic-metadata">

**Author:** [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Replies:** 4\
**Last updated:** [March 13, 2021, 10:40pm UTC](https://discourse.julialang.org/t/ann-ioncli-your-package-manager-and-more-in-terminal/44946 "2021-03-13T22:40:22Z")

</div>

Although I still have a lot feature want to add to it, I think it’s time to announce this and let people try it since I have been making whoever I know to try it in past few weeks. Thus I’m announcing a new CLI package I…

---

## [Calling a function by argument type only](https://discourse.julialang.org/t/calling-a-function-by-argument-type-only/57094)

<div class="topic-metadata">

**Author:** [@jeffreyesun](https://discourse.julialang.org/u/jeffreyesun)\
**Replies:** 7\
**Last updated:** [March 13, 2021, 9:54pm UTC](https://discourse.julialang.org/t/calling-a-function-by-argument-type-only/57094 "2021-03-13T21:54:36Z")

</div>

I have seen functions defined without argument values, just types for dispatch as so: function foo(::Int, n) return Int(n) end First question: What is this type-only argument style called? I can’t seem to find its do…

---

## [Free all packages at once](https://discourse.julialang.org/t/free-all-packages-at-once/57075)

<div class="topic-metadata">

**Author:** [@lferrant](https://discourse.julialang.org/u/lferrant)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 8:52pm UTC](https://discourse.julialang.org/t/free-all-packages-at-once/57075 "2021-03-13T20:52:55Z")

</div>

Hi everyone, suppose I am deving several packages, say PkgA, PkgB, PkgC. Is there a shortcut (like free all or something) to free all packages at once without having to explicitly type all package names like in free Pkg…

---

## [Julia on Slurm Cluster](https://discourse.julialang.org/t/julia-on-slurm-cluster/57090)

<div class="topic-metadata">

**Author:** [@Shazman](https://discourse.julialang.org/u/Shazman)\
**Replies:** 5\
**Last updated:** [March 13, 2021, 8:40pm UTC](https://discourse.julialang.org/t/julia-on-slurm-cluster/57090 "2021-03-13T20:40:05Z")

</div>

Hi, I am trying to run Julia on SlurmCluster, my data is in my current directory on the Cluster. the julia code Id like to run (main.jl) using DelimitedFiles mme = readdlm(“mme.txt”) rhs = readdlm(“rhs.txt”) b = …

---

## [Sampling with replacement on GPU](https://discourse.julialang.org/t/sampling-with-replacement-on-gpu/56121)

<div class="topic-metadata">

**Author:** [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Replies:** 5\
**Last updated:** [March 13, 2021, 8:05pm UTC](https://discourse.julialang.org/t/sampling-with-replacement-on-gpu/56121 "2021-03-13T20:05:51Z")

</div>

I have a CuArray with weights, i.e. each row is a weight vector (not necessarily normalized but this is easy to accomplish if needed). I want to draw number\_of\_column numbers in 1:number\_of\_columns for each of the rows i…

---

## [Packages not being found on JULIA\_DEPOT\_PATH](https://discourse.julialang.org/t/packages-not-being-found-on-julia-depot-path/57070)

<div class="topic-metadata">

**Author:** [@idontgetoutmuch](https://discourse.julialang.org/u/idontgetoutmuch)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 7:05pm UTC](https://discourse.julialang.org/t/packages-not-being-found-on-julia-depot-path/57070 "2021-03-13T19:05:48Z")

</div>

I am getting using Gadfly ERROR: ArgumentError: Package Gadfly not found in current path: - Run \`import Pkg; Pkg.add("Gadfly")\` to install the Gadfly package. but I have julia\> ENV ENV Base.EnvDict with 29 entries: …

---

## [I am getting\`\`\`using GadflyERROR: ArgumentError: Package Gadfly not found in cu](https://discourse.julialang.org/t/i-am-getting-using-gadflyerror-argumenterror-package-gadfly-not-found-in-cu/57088)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 7:04pm UTC](https://discourse.julialang.org/t/i-am-getting-using-gadflyerror-argumenterror-package-gadfly-not-found-in-cu/57088 "2021-03-13T19:04:54Z")

</div>

I am getting using Gadfly ERROR: ArgumentError: Package Gadfly not found in current path: - Run \`import Pkg; Pkg.add("Gadfly")\` to install the Gadfly package. but I have julia&gt; ENV ENV Base.EnvDict with 29 entries:…

---

## [DataType and Type{T}](https://discourse.julialang.org/t/datatype-and-type-t/57082)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 6:57pm UTC](https://discourse.julialang.org/t/datatype-and-type-t/57082 "2021-03-13T18:57:09Z")

</div>

I don’t understand the following: julia\> String isa Type{String} true julia\> ("abc", String) isa Tuple{String, Type{String}} # ? false julia\> ("abc", String) isa Tuple{String, Type{T} where T} true julia\> ("abc", S…

---

## [Select point from plot \[not hover needed\], Makie](https://discourse.julialang.org/t/select-point-from-plot-not-hover-needed-makie/57081)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 6:29pm UTC](https://discourse.julialang.org/t/select-point-from-plot-not-hover-needed-makie/57081 "2021-03-13T18:29:16Z")

</div>

Hello, while reading the documentation, I noticed that there is a section for interactivity and action on buttons, however I would like to know if it is possible to retrieve points from a plot by clicking on the plot?\[h…

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

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