# Latest

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

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

**Page:** 1921

---

## [Functions that modify recipe (RecipesBase)](https://discourse.julialang.org/t/functions-that-modify-recipe-recipesbase/28788)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 1\
**Last updated:** [September 15, 2019, 2:50pm UTC](https://discourse.julialang.org/t/functions-that-modify-recipe-recipesbase/28788 "2019-09-15T14:50:41Z")

</div>

I’m trying to do something seemingly simple with RecipesBase thats turning out to be a bit of a headache. Is there a pragmatic way to make a function that returns a call from an @recipe plot function? Here is a toy prom…

---

## [Format code: guides?](https://discourse.julialang.org/t/format-code-guides/28780)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 2\
**Last updated:** [September 15, 2019, 3:58am UTC](https://discourse.julialang.org/t/format-code-guides/28780 "2019-09-15T03:58:36Z")

</div>

Where is the rules for the “Format code” located? Juno is split among many github repos and I’m not sure which one this function resides in. I want to study it as some good code formatting guidelines. One thing I noticed…

---

## [Error during bootstrap while building Julia 1.2 on macOS Mojave](https://discourse.julialang.org/t/error-during-bootstrap-while-building-julia-1-2-on-macos-mojave/28781)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 0\
**Last updated:** [September 15, 2019, 3:39am UTC](https://discourse.julialang.org/t/error-during-bootstrap-while-building-julia-1-2-on-macos-mojave/28781 "2019-09-15T03:39:00Z")

</div>

While building Julia 1.2 on macOS Mojave, I get an error during bootstrap: $ git checkout release-1.2 Already on 'release-1.2' Your branch is up to date with 'origin/release-1.2'. $ make ... error during bootstrap: Load…

---

## [How to dispatch based on whether a type has fields or not?](https://discourse.julialang.org/t/how-to-dispatch-based-on-whether-a-type-has-fields-or-not/28773)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [September 15, 2019, 12:19am UTC](https://discourse.julialang.org/t/how-to-dispatch-based-on-whether-a-type-has-fields-or-not/28773 "2019-09-15T00:19:13Z")

</div>

I want to dispatch based on whether the type has fields or not. I have now hasfieldnames(::Type{T}) where T = fieldnames(T) \>= 1 fn(::Type{T}) where T = begin if hasfieldnames(T) \_fn\_has\_field\_name(T) else …

---

## [How to check which package is preventing updates](https://discourse.julialang.org/t/how-to-check-which-package-is-preventing-updates/28771)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 1\
**Last updated:** [September 14, 2019, 11:37pm UTC](https://discourse.julialang.org/t/how-to-check-which-package-is-preventing-updates/28771 "2019-09-14T23:37:12Z")

</div>

Is there a way to check which package is preventing the updates for other packages? The old discussion here uses REQUIRE which is no longer applies since now julia has switched to toml. Does Pkg have a FWIW, some packag…

---

## [Does Pkg.test() return anything useful?](https://discourse.julialang.org/t/does-pkg-test-return-anything-useful/28761)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 1\
**Last updated:** [September 14, 2019, 8:32pm UTC](https://discourse.julialang.org/t/does-pkg-test-return-anything-useful/28761 "2019-09-14T20:32:37Z")

</div>

It seems to me that Pkg.test() returns nothing. Is there a way in which I could find out programmatically if the tests passed?

---

## [Structs with custom ordering in a heap](https://discourse.julialang.org/t/structs-with-custom-ordering-in-a-heap/28753)

<div class="topic-metadata">

**Author:** [@milesf](https://discourse.julialang.org/u/milesf)\
**Replies:** 2\
**Last updated:** [September 14, 2019, 8:04pm UTC](https://discourse.julialang.org/t/structs-with-custom-ordering-in-a-heap/28753 "2019-09-14T20:04:21Z")

</div>

I have a collection of structs that I want to maintain with a heap. The comparison rules for this struct are defined by a custom ordering. I managed to get sorting working for an array of these structs, but it seems li…

---

## [Circshift an array with undef elements](https://discourse.julialang.org/t/circshift-an-array-with-undef-elements/28763)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 6\
**Last updated:** [September 14, 2019, 6:06pm UTC](https://discourse.julialang.org/t/circshift-an-array-with-undef-elements/28763 "2019-09-14T18:06:46Z")

</div>

Is there way to circshift an array with undef element. When this is tried, below is the exception thrown. julia\> a = Vector{Vector{Float64}}(undef, 3) a3-element Array{Array{Float64,1},1}: #undef #undef #undef juli…

---

## [Julia v1.0.5 is now available](https://discourse.julialang.org/t/julia-v1-0-5-is-now-available/28752)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 10\
**Last updated:** [September 14, 2019, 4:28pm UTC](https://discourse.julialang.org/t/julia-v1-0-5-is-now-available/28752 "2019-09-14T16:28:33Z")

</div>

Julia version 1.0.5, the fifth patch release for the 1.0 long-term support series of releases, is now available. You can get binaries for Linux (i686, x86-64, ARMv7, AArch64), FreeBSD (x86-64), macOS, and Windows (32-, 6…

---

## [Testing multiple packages in a batch](https://discourse.julialang.org/t/testing-multiple-packages-in-a-batch/28756)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 6\
**Last updated:** [September 14, 2019, 1:15pm UTC](https://discourse.julialang.org/t/testing-multiple-packages-in-a-batch/28756 "2019-09-14T13:15:20Z")

</div>

I have multiple packages that I would like to test more or less automatically. For an arbitrary one of these I would clone it, start Julia, and do: cd("Package path") using Pkg …

---

## [Drop array dimension with Statistics.mean etc](https://discourse.julialang.org/t/drop-array-dimension-with-statistics-mean-etc/28759)

<div class="topic-metadata">

**Author:** [@leethargo](https://discourse.julialang.org/u/leethargo)\
**Replies:** 3\
**Last updated:** [September 14, 2019, 12:47pm UTC](https://discourse.julialang.org/t/drop-array-dimension-with-statistics-mean-etc/28759 "2019-09-14T12:47:20Z")

</div>

I’m using aggregations such as Statistics.mean on multi-dimension arrays, working across a specific dimension. The default behavior is to return an Array with the same number of dimensions, but only one entry in the aggr…

---

## [BinaryBuilder libGL and libGLU](https://discourse.julialang.org/t/binarybuilder-libgl-and-libglu/23890)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 2\
**Last updated:** [September 14, 2019, 11:29am UTC](https://discourse.julialang.org/t/binarybuilder-libgl-and-libglu/23890 "2019-09-14T11:29:16Z")

</div>

I am trying to use BinaryBuilder to build bullet3 with its GUI. The project uses CMake’s FIND\_PACKAGE(OpenGL), which on my Ubuntu system finds the libraries at /usr/lib/x86\_64-linux-gnu/libGL.so and /usr/lib/x86\_64-linu…

---

## [General vs Custom Registries](https://discourse.julialang.org/t/general-vs-custom-registries/28687)

<div class="topic-metadata">

**Author:** [@cortner](https://discourse.julialang.org/u/cortner)\
**Replies:** 14\
**Last updated:** [September 14, 2019, 10:23am UTC](https://discourse.julialang.org/t/general-vs-custom-registries/28687 "2019-09-14T10:23:34Z")

</div>

I am interested in views on registering a package in the General registry versus managing my own Custom Registry. For some packages that are widely used this is obvious (ForwarsDiff, Optim, StaticArrays, . . .); But wha…

---

## [Queryverse: How to @select columns with specific eltype? (using \`oftype\` function)](https://discourse.julialang.org/t/queryverse-how-to-select-columns-with-specific-eltype-using-oftype-function/28709)

<div class="topic-metadata">

**Author:** [@Anselm\_Jeong](https://discourse.julialang.org/u/Anselm_Jeong)\
**Replies:** 3\
**Last updated:** [September 14, 2019, 10:14am UTC](https://discourse.julialang.org/t/queryverse-how-to-select-columns-with-specific-eltype-using-oftype-function/28709 "2019-09-14T10:14:47Z")

</div>

Dear all Queryverse users. In an auxilary package QueryOperators.NamedTupleUtilities, there is a helper function named oftype. I guess it is related with selecting columns with specific eltype. But I cannot figure out h…

---

## [Performance of Dates.Time equality and comparison](https://discourse.julialang.org/t/performance-of-dates-time-equality-and-comparison/28738)

<div class="topic-metadata">

**Author:** [@artemsolod](https://discourse.julialang.org/u/artemsolod)\
**Replies:** 3\
**Last updated:** [September 14, 2019, 10:09am UTC](https://discourse.julialang.org/t/performance-of-dates-time-equality-and-comparison/28738 "2019-09-14T10:09:45Z")

</div>

I am noticing large performance costs when doing operations with Time (as compared to DateTime). One example would be using Dates n = now(); arr\_dt = \[n for \_ in 1:10^7\]; arr\_ts = Time.(arr\_dt); all(arr\_dt .== arr\_dt);…

---

## [How to call some special functions in julia v0.6?](https://discourse.julialang.org/t/how-to-call-some-special-functions-in-julia-v0-6/5127)

<div class="topic-metadata">

**Author:** [@BVPs](https://discourse.julialang.org/u/BVPs)\
**Replies:** 5\
**Last updated:** [September 14, 2019, 5:56am UTC](https://discourse.julialang.org/t/how-to-call-some-special-functions-in-julia-v0-6/5127 "2019-09-14T05:56:10Z")

</div>

Hello. Apparently, some of the special functions are moved to SpecialFunctions.jl in julia v0.6, e.g., besselj0. When I call this function, it generates the following warning: julia\> using SpecialFunctions julia\> x=0.01…

---

## [Function f(::T{A})::A where A ... VS f(::T{A})::A where A](https://discourse.julialang.org/t/function-f-t-a-a-where-a-vs-f-t-a-a-where-a/28746)

<div class="topic-metadata">

**Author:** [@o314](https://discourse.julialang.org/u/o314)\
**Replies:** 2\
**Last updated:** [September 14, 2019, 4:58am UTC](https://discourse.julialang.org/t/function-f-t-a-a-where-a-vs-f-t-a-a-where-a/28746 "2019-09-14T04:58:15Z")

</div>

Suppose we have a parametric type using Test struct T{A} end And a function above this type with an explicit return type. Here is the long form. Works ok function f(::T{A})::A where A one(A) end @test f(T{Int}(…

---

## [Text Classification with Word Embeddings using Flux](https://discourse.julialang.org/t/text-classification-with-word-embeddings-using-flux/28751)

<div class="topic-metadata">

**Author:** [@Nigel\_Adams](https://discourse.julialang.org/u/Nigel_Adams)\
**Replies:** 2\
**Last updated:** [September 14, 2019, 3:09am UTC](https://discourse.julialang.org/t/text-classification-with-word-embeddings-using-flux/28751 "2019-09-14T03:09:50Z")

</div>

I’ve been experimenting with text classification using word embeddings and Flux. The posts start simple and work their way up to a project using 1d Convolutions. I couldn’t find many Julia examples on the web in this a…

---

## [Simple NLP in Flux with Embedding Layer](https://discourse.julialang.org/t/simple-nlp-in-flux-with-embedding-layer/27870)

<div class="topic-metadata">

**Author:** [@Nigel\_Adams](https://discourse.julialang.org/u/Nigel_Adams)\
**Replies:** 2\
**Last updated:** [August 25, 2019, 3:28am UTC](https://discourse.julialang.org/t/simple-nlp-in-flux-with-embedding-layer/27870 "2019-08-25T03:28:21Z")

</div>

I’m trying to learn the use of embedding layers by the way of 10 string documents labelled as positive or negative. StringDocs = \["well done", "good work", "great effort", "nice work", "excellent", "weak", "poor effort"…

---

## [Is there a Julia command that is the equivalent of \`tar\` on linux?](https://discourse.julialang.org/t/is-there-a-julia-command-that-is-the-equivalent-of-tar-on-linux/28747)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [September 14, 2019, 1:58am UTC](https://discourse.julialang.org/t/is-there-a-julia-command-that-is-the-equivalent-of-tar-on-linux/28747 "2019-09-14T01:58:39Z")

</div>

I have alot of small files and I want to group them into one file. I know tar does it. But I need to support Windows. Is there a Julia function that does the same as tar? And can untar a file?

---

## [Inconsistency concerning size(Array) and size(Sparse)](https://discourse.julialang.org/t/inconsistency-concerning-size-array-and-size-sparse/28744)

<div class="topic-metadata">

**Author:** [@Lecrapouille](https://discourse.julialang.org/u/Lecrapouille)\
**Replies:** 10\
**Last updated:** [September 14, 2019, 12:52am UTC](https://discourse.julialang.org/t/inconsistency-concerning-size-array-and-size-sparse/28744 "2019-09-14T00:52:16Z")

</div>

Hi ! I could not find the explanation of why size(\[1;1;1\]) returns the wrong answer since julia 0.4 → 1.2.0 while okay for a sparse matrix ? Look: julia\> size(\[1;1;1\]) # Expected to have (3,1) or (3,1,) but ok for (3,) …

---

## [I need advices to solve Ax=b with Mmap](https://discourse.julialang.org/t/i-need-advices-to-solve-ax-b-with-mmap/28662)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 16\
**Last updated:** [September 13, 2019, 11:14pm UTC](https://discourse.julialang.org/t/i-need-advices-to-solve-ax-b-with-mmap/28662 "2019-09-13T23:14:57Z")

</div>

Hellos My topic title is clear, I am solving Ax=b (x=A\\b). I know that my system will become big, and I want to try Mmap to store my data. Here the basic code: using Mmap N = 2\_000 A = rand(N, N) b = rand(N) io\_A = …

---

## [How to compute partial derivatives efficiently with Zygote](https://discourse.julialang.org/t/how-to-compute-partial-derivatives-efficiently-with-zygote/28731)

<div class="topic-metadata">

**Author:** [@SEA](https://discourse.julialang.org/u/SEA)\
**Replies:** 2\
**Last updated:** [September 13, 2019, 7:23pm UTC](https://discourse.julialang.org/t/how-to-compute-partial-derivatives-efficiently-with-zygote/28731 "2019-09-13T19:23:38Z")

</div>

Suppose we have a function f(x, y), and want to compute \\partial\_x f(x,y) for many y’s, ideally using no memory allocation. Using Zygote, I tried Zygote.forwarddiff(y-\>f(x,y), y). However, I believe this creates a new a…

---

## [REPL in JUNO diappearing text](https://discourse.julialang.org/t/repl-in-juno-diappearing-text/28728)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 0\
**Last updated:** [September 13, 2019, 5:44pm UTC](https://discourse.julialang.org/t/repl-in-juno-diappearing-text/28728 "2019-09-13T17:44:11Z")

</div>

If I leave then come back to the Juno REPL window and start typing, often I’ll find that the first few characters aren’t displayed and the prompt is missing. Then if I backspace, the text all appears, duplicated on the l…

---

## [\[ANN\] GeneralizedGenerated.jl: less restricted @generated functions and runtime eval mechanism](https://discourse.julialang.org/t/ann-generalizedgenerated-jl-less-restricted-generated-functions-and-runtime-eval-mechanism/28725)

<div class="topic-metadata">

**Author:** [@thautwarm](https://discourse.julialang.org/u/thautwarm)\
**Replies:** 0\
**Last updated:** [September 13, 2019, 4:27pm UTC](https://discourse.julialang.org/t/ann-generalizedgenerated-jl-less-restricted-generated-functions-and-runtime-eval-mechanism/28725 "2019-09-13T16:27:11Z")

</div>

Introduction Roughly: Use case 1: Runtime eval julia\> module WorldAgeProblemRaisedHere! do\_this!(one\_ary\_fn\_ast::Expr, arg) = begin eval(one\_ary\_fn\_ast)(arg) end res = do\_…

---

## [Problem with GPU programming](https://discourse.julialang.org/t/problem-with-gpu-programming/28704)

<div class="topic-metadata">

**Author:** [@sergevic](https://discourse.julialang.org/u/sergevic)\
**Replies:** 4\
**Last updated:** [September 13, 2019, 4:09pm UTC](https://discourse.julialang.org/t/problem-with-gpu-programming/28704 "2019-09-13T16:09:20Z")

</div>

I have the following code that I can run on Julia v.1.1: using LinearAlgebra L=Symmetric(rand(Float32,10000,10000)) C=zeros(Float32,size(L,1),size(L,2)) D=zeros(Float32,size(L,1),size(L,2)) D\[1,1\]=1 k=750 function Lap…

---

## [Append!() with Tuple and Dict](https://discourse.julialang.org/t/append-with-tuple-and-dict/6471)

<div class="topic-metadata">

**Author:** [@giuan](https://discourse.julialang.org/u/giuan)\
**Replies:** 7\
**Last updated:** [September 13, 2019, 3:44pm UTC](https://discourse.julialang.org/t/append-with-tuple-and-dict/6471 "2019-09-13T15:44:25Z")

</div>

Why x = Any\[1,2\] append!(x,Dict("a"=\>1,"b"=\>2)) append!(x,("j","k")) println(x) print Any\[1, 2, "b"=\>2, "a"=\>1, "j", "k"\]? In python x = \[1,2\] x.append({"a":1,"b":2}) x.append(("a","b")) print(x) print \[1, 2, {'a': …

---

## [Inconsistency of NaN](https://discourse.julialang.org/t/inconsistency-of-nan/28671)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 14\
**Last updated:** [September 13, 2019, 2:59pm UTC](https://discourse.julialang.org/t/inconsistency-of-nan/28671 "2019-09-13T14:59:36Z")

</div>

0/0 returns NaN NaN\*false returns 0.0 (0/0)\*false returns -0.0 Isn’t this an inconsistency of NaN? :thinking: Also: julia\> (NaN\*(0/0))\*false 0.0 but: julia\> ((0/0)\*NaN)\*false -0.0 :thinking:

---

## [Elementwise comparison of Arrays yield a x-element BitArray{1} with zeros instead of Bool](https://discourse.julialang.org/t/elementwise-comparison-of-arrays-yield-a-x-element-bitarray-1-with-zeros-instead-of-bool/28700)

<div class="topic-metadata">

**Author:** [@markushhh](https://discourse.julialang.org/u/markushhh)\
**Replies:** 2\
**Last updated:** [September 13, 2019, 11:11am UTC](https://discourse.julialang.org/t/elementwise-comparison-of-arrays-yield-a-x-element-bitarray-1-with-zeros-instead-of-bool/28700 "2019-09-13T11:11:13Z")

</div>

Is this a known and desirable result? I just tested this in in v"1.1.0" and the result is a Bool. From the Doc (v1.2): “Note that comparisons such as == operate on whole arrays, giving a single boolean answer. Use do…

---

## [\[Interact.jl\] faulty ribbons in gif](https://discourse.julialang.org/t/interact-jl-faulty-ribbons-in-gif/28715)

<div class="topic-metadata">

**Author:** [@MatFi](https://discourse.julialang.org/u/MatFi)\
**Replies:** 0\
**Last updated:** [September 13, 2019, 9:10am UTC](https://discourse.julialang.org/t/interact-jl-faulty-ribbons-in-gif/28715 "2019-09-13T09:10:06Z")

</div>

When using interact together with @manipulate all seems to be fine using Plots, Interact gr() x=-2:0.1:5 ui = @manipulate for i in Interact.slider(1:10;label="time", value=1) plot(x,i\*exp.(-x).+i\*exp.(2\*x),ribbon=10…

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

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