# Latest

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

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

**Page:** 1777

---

## [Code taking too long to run. Need some advice](https://discourse.julialang.org/t/code-taking-too-long-to-run-need-some-advice/37485)

<div class="topic-metadata">

**Author:** [@baba12321](https://discourse.julialang.org/u/baba12321)\
**Replies:** 2\
**Last updated:** [April 13, 2020, 5:45am UTC](https://discourse.julialang.org/t/code-taking-too-long-to-run-need-some-advice/37485 "2020-04-13T05:45:04Z")

</div>

First time user here and I am working on a basic scheduling of jobs. The data for the code is generated using: Data generator n = 20 # number of tasks min\_end = 5 # the min end time of any task max\_end = 15 # the max…

---

## [Numerical Problems](https://discourse.julialang.org/t/numerical-problems/37364)

<div class="topic-metadata">

**Author:** [@Andres\_Gonzalez](https://discourse.julialang.org/u/Andres_Gonzalez)\
**Replies:** 12\
**Last updated:** [April 13, 2020, 4:29am UTC](https://discourse.julialang.org/t/numerical-problems/37364 "2020-04-13T04:29:42Z")

</div>

Hi all, I’m trying to write a simple code for an MCMC and I get into numerical errors when comparing two numbers in the metropolis step. The code for the metropolis step is if rand() \< exp( lokNew - logOld) oldPar = N…

---

## [\[ANN\] ColorBlendModes.jl](https://discourse.julialang.org/t/ann-colorblendmodes-jl/37480)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 0\
**Last updated:** [April 13, 2020, 1:35am UTC](https://discourse.julialang.org/t/ann-colorblendmodes-jl/37480 "2020-04-13T01:35:07Z")

</div>

Hi all, I’d like to announce ColorBlendModes, an add-on to ColorTypes, just like ColorVectorSpace. This package provides the definitions and compositing operations of the blend modes. Examples using ColorTypes, ColorB…

---

## [Subcategory of Tooling for Vim](https://discourse.julialang.org/t/subcategory-of-tooling-for-vim/37474)

<div class="topic-metadata">

**Author:** [@jessebett](https://discourse.julialang.org/u/jessebett)\
**Replies:** 0\
**Last updated:** [April 12, 2020, 11:22pm UTC](https://discourse.julialang.org/t/subcategory-of-tooling-for-vim/37474 "2020-04-12T23:22:13Z")

</div>

Can we get a subcategory of Tooling for vim?

---

## [How to access function documentation in a script](https://discourse.julialang.org/t/how-to-access-function-documentation-in-a-script/37466)

<div class="topic-metadata">

**Author:** [@jonathan-durbin](https://discourse.julialang.org/u/jonathan-durbin)\
**Replies:** 6\
**Last updated:** [April 12, 2020, 10:45pm UTC](https://discourse.julialang.org/t/how-to-access-function-documentation-in-a-script/37466 "2020-04-12T22:45:57Z")

</div>

Is there a way to access the documentation string associated with a function that is part of a module? Consider this example: module Test export f """ f(x) Return \`x\` squared. """ function f(x) return x^2 en…

---

## [Mixing Union Types and Dictionaries](https://discourse.julialang.org/t/mixing-union-types-and-dictionaries/37462)

<div class="topic-metadata">

**Author:** [@Holdmycoffee](https://discourse.julialang.org/u/Holdmycoffee)\
**Replies:** 1\
**Last updated:** [April 12, 2020, 10:42pm UTC](https://discourse.julialang.org/t/mixing-union-types-and-dictionaries/37462 "2020-04-12T22:42:22Z")

</div>

Hello, Newbie here. First, does anyone know why Dict{Real, Int64}\<:Dict{Union{T, Array{T, 1}}, Int64} where T\<:Real yields false? Secondly, I am able define the following two types, Dict{Tuple{Union{Array{T,1}, T}, …

---

## [Initializing Dictionary and where syntax](https://discourse.julialang.org/t/initializing-dictionary-and-where-syntax/37467)

<div class="topic-metadata">

**Author:** [@Holdmycoffee](https://discourse.julialang.org/u/Holdmycoffee)\
**Replies:** 1\
**Last updated:** [April 12, 2020, 9:47pm UTC](https://discourse.julialang.org/t/initializing-dictionary-and-where-syntax/37467 "2020-04-12T21:47:51Z")

</div>

Is there any difference between Dict{T where T\<: Real, Int64}() and Dict{Real, Int64}() ?

---

## [Branch in dispatch on values](https://discourse.julialang.org/t/branch-in-dispatch-on-values/37465)

<div class="topic-metadata">

**Author:** [@mforets](https://discourse.julialang.org/u/mforets)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 9:37pm UTC](https://discourse.julialang.org/t/branch-in-dispatch-on-values/37465 "2020-04-12T21:37:08Z")

</div>

This has probably been discussed elsewhere, but I didn’t find it. Why do the runtimes of foo and bar functions below differ? Since w is constrained to be a boolean, I didn’t expect to see such a huge difference. Let fu…

---

## [Problems embedding Julia in C++](https://discourse.julialang.org/t/problems-embedding-julia-in-c/37455)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 5\
**Last updated:** [April 12, 2020, 7:25pm UTC](https://discourse.julialang.org/t/problems-embedding-julia-in-c/37455 "2020-04-12T19:25:37Z")

</div>

Hello! I am properly making a small mistake somewhere, but basically I am using CMake to try to include Julia capabilities in my cpp project. What I have in my CMakeLists.txt for that specific part of the project is: i…

---

## [Try to work with 2 Modules, but get an error](https://discourse.julialang.org/t/try-to-work-with-2-modules-but-get-an-error/37438)

<div class="topic-metadata">

**Author:** [@ayang19](https://discourse.julialang.org/u/ayang19)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 6:22pm UTC](https://discourse.julialang.org/t/try-to-work-with-2-modules-but-get-an-error/37438 "2020-04-12T18:22:07Z")

</div>

I’m new to Julia. I’m defining a struct in one module ‘myModule’ and try to get an object from another module ‘myMain’. myModule.jl can compile but not myMain.jl, getting this error. I’m also pasting code at bottom. App…

---

## [\[ANN\] ReinforcementLearning.jl v0.4.0](https://discourse.julialang.org/t/ann-reinforcementlearning-jl-v0-4-0/35348)

<div class="topic-metadata">

**Author:** [@findmyway](https://discourse.julialang.org/u/findmyway)\
**Replies:** 1\
**Last updated:** [April 12, 2020, 6:21pm UTC](https://discourse.julialang.org/t/ann-reinforcementlearning-jl-v0-4-0/35348 "2020-04-12T18:21:48Z")

</div>

Hi all, I’d like to announce a new release of ReinforcementLearning.jl. It’s been a really long time since our last release (almost a year and a half). Especially thank @jbrea for his encouragement, I reorganized almost…

---

## [PkgBenchmark.jl workflow](https://discourse.julialang.org/t/pkgbenchmark-jl-workflow/24472)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 7\
**Last updated:** [April 12, 2020, 4:48pm UTC](https://discourse.julialang.org/t/pkgbenchmark-jl-workflow/24472 "2020-04-12T16:48:26Z")

</div>

This is basically a revival of Benchmarking with PkgBenchmark.jl from two years ago. Benchmarking packages to detect regressions seems very important, but I don’t quite get how to use PkgBenchmark.jl effectively. In par…

---

## [Trouble installing ZeroMQ when installing IJulia in ArchWSL](https://discourse.julialang.org/t/trouble-installing-zeromq-when-installing-ijulia-in-archwsl/33961)

<div class="topic-metadata">

**Author:** [@wuli](https://discourse.julialang.org/u/wuli)\
**Replies:** 7\
**Last updated:** [April 12, 2020, 3:41pm UTC](https://discourse.julialang.org/t/trouble-installing-zeromq-when-installing-ijulia-in-archwsl/33961 "2020-04-12T15:41:58Z")

</div>

Hi. I am having problems installing ZMQ when I try to install IJulia. I am using ArchLinux in WSL2 on Win10 version 19041, julia version 1.3.1. Servel weeks ago I have successfully installed IJulia. For some reason I h…

---

## [Genie.jl in Julia vs Plotly-express in Python](https://discourse.julialang.org/t/genie-jl-in-julia-vs-plotly-express-in-python/37447)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 3:31pm UTC](https://discourse.julialang.org/t/genie-jl-in-julia-vs-plotly-express-in-python/37447 "2020-04-12T15:31:01Z")

</div>

anyone out there had a chance to code in both Genie.jl and Plotly-express ( Or Dash). I’d like to hear their opinions on comparing Genie.jl vs Plotly-express OR Dash.

---

## [Bug in Julia rational array inplace multiplication](https://discourse.julialang.org/t/bug-in-julia-rational-array-inplace-multiplication/37446)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 7\
**Last updated:** [April 12, 2020, 2:16pm UTC](https://discourse.julialang.org/t/bug-in-julia-rational-array-inplace-multiplication/37446 "2020-04-12T14:16:02Z")

</div>

On AMD64, julia\> x=\[1//1\];x.\*=1/5 1-element Array{Rational{Int64},1}: 3602879701896397//18014398509481984 but on i386 works correctly. See travis build for this repo for behavior on different platforms.

---

## [How to make Zygote not use its default @adjoint for transposition in my custom matrix representation](https://discourse.julialang.org/t/how-to-make-zygote-not-use-its-default-adjoint-for-transposition-in-my-custom-matrix-representation/37422)

<div class="topic-metadata">

**Author:** [@tlauli](https://discourse.julialang.org/u/tlauli)\
**Replies:** 3\
**Last updated:** [April 12, 2020, 2:20pm UTC](https://discourse.julialang.org/t/how-to-make-zygote-not-use-its-default-adjoint-for-transposition-in-my-custom-matrix-representation/37422 "2020-04-12T14:20:18Z")

</div>

Hello, #Minimal Working Example using Flux, Zygote struct MyMat{T} m::Matrix{T} n::Int end Flux.trainable(a::MyMat) = (a.m,) Matrix(a::MyMat) = a.m import Base:transpose #these two functions differ in name only fun…

---

## [Tanmay Bakshi tried to teach me ML, but I failed and I don't know why](https://discourse.julialang.org/t/tanmay-bakshi-tried-to-teach-me-ml-but-i-failed-and-i-dont-know-why/37415)

<div class="topic-metadata">

**Author:** [@Klaus](https://discourse.julialang.org/u/Klaus)\
**Replies:** 4\
**Last updated:** [April 12, 2020, 1:39pm UTC](https://discourse.julialang.org/t/tanmay-bakshi-tried-to-teach-me-ml-but-i-failed-and-i-dont-know-why/37415 "2020-04-12T13:39:08Z")

</div>

I tried this code snippet from the book (…springboard to machine learning for all ages): using Metalhead: VGG19, preprocess, load, labels using Flux: onecold model = VGG19() class\_labels = labels(model) print("Enter t…

---

## [Weave and Unicode](https://discourse.julialang.org/t/weave-and-unicode/37048)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 1\
**Last updated:** [April 12, 2020, 11:40am UTC](https://discourse.julialang.org/t/weave-and-unicode/37048 "2020-04-12T11:40:19Z")

</div>

Hellos I was testing for fun the Weave.jl package, and I noticed that I cannot make some Unicode symbols to appear. Here an exemple, I create the file test.jmd with the lines: --- title : Test date : today --- ​ # Sect…

---

## [Pi raised to negative integer powers produces a strange error message, and the literal\_pow obfuscation](https://discourse.julialang.org/t/pi-raised-to-negative-integer-powers-produces-a-strange-error-message-and-the-literal-pow-obfuscation/37434)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [April 12, 2020, 9:27am UTC](https://discourse.julialang.org/t/pi-raised-to-negative-integer-powers-produces-a-strange-error-message-and-the-literal-pow-obfuscation/37434 "2020-04-12T09:27:21Z")

</div>

I am trying to raise pi to negative integer powers, and end up with unexpected errors: julia\> pi^-2 # works 0.10132118364233779 julia\> n=2; pi^-n # doesn't work ERROR: DomainError with -2: Cannot raise an integer x to …

---

## [RIP John Conway - and a marvellous article on his life](https://discourse.julialang.org/t/rip-john-conway-and-a-marvellous-article-on-his-life/37439)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 1\
**Last updated:** [April 12, 2020, 9:00am UTC](https://discourse.julialang.org/t/rip-john-conway-and-a-marvellous-article-on-his-life/37439 "2020-04-12T09:00:06Z")

</div>

A friend on Twitter passed on the news that John Conway has died. This Guardian article is just marvellous.

---

## [Transpose operator](https://discourse.julialang.org/t/transpose-operator/37393)

<div class="topic-metadata">

**Author:** [@Vage\_Karakhanyan](https://discourse.julialang.org/u/Vage_Karakhanyan)\
**Replies:** 11\
**Last updated:** [April 12, 2020, 7:48am UTC](https://discourse.julialang.org/t/transpose-operator/37393 "2020-04-12T07:48:42Z")

</div>

Hello everyone, I am trying to use a transpose operator over a vector in order to perform am element-wise addition. For example, I want to add a column vector a = \[a1;a2;a3\] to a row vector b = \[b1,b2\] I should get mat…

---

## [Trying not to overload Base.open](https://discourse.julialang.org/t/trying-not-to-overload-base-open/37432)

<div class="topic-metadata">

**Author:** [@jstrube](https://discourse.julialang.org/u/jstrube)\
**Replies:** 4\
**Last updated:** [April 12, 2020, 5:46am UTC](https://discourse.julialang.org/t/trying-not-to-overload-base-open/37432 "2020-04-12T05:46:30Z")

</div>

I am trying to define a method open in my own module. I have no interest in overloading Base.open and it’s not imported in my module. However, Travis now complains with: ERROR: LoadError: error in method definition: fu…

---

## [Help with Puzzle Solver Program](https://discourse.julialang.org/t/help-with-puzzle-solver-program/37412)

<div class="topic-metadata">

**Author:** [@peterfarrell66](https://discourse.julialang.org/u/peterfarrell66)\
**Replies:** 5\
**Last updated:** [April 12, 2020, 4:30am UTC](https://discourse.julialang.org/t/help-with-puzzle-solver-program/37412 "2020-04-12T04:30:08Z")

</div>

Hi! I’m new to Julia but I’ve had years of experience using Python and some Javascript too. I wrote a puzzle solving program in Python and got a big speedup when I translated it to Javascript. I’ve taken a bash at a Jul…

---

## [Flux.jl, Network size reduction](https://discourse.julialang.org/t/flux-jl-network-size-reduction/37413)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 1\
**Last updated:** [April 12, 2020, 3:43am UTC](https://discourse.julialang.org/t/flux-jl-network-size-reduction/37413 "2020-04-12T03:43:31Z")

</div>

I have the following code, copied and slightly modified from GitHub - r3tex/LossSurface: Efficient Neural Network Loss Landscape Generation. Here is the code: sing Flux #using CuArrays batchsize = 64 dat\_x = Flux.Data…

---

## [Play a sound in Jupyter Notebook](https://discourse.julialang.org/t/play-a-sound-in-jupyter-notebook/15870)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 11\
**Last updated:** [April 12, 2020, 2:55am UTC](https://discourse.julialang.org/t/play-a-sound-in-jupyter-notebook/15870 "2020-04-12T02:55:41Z")

</div>

I want my Jupyter notebook to play a sound when a cell is done, what is the easiest way to do this? long\_running\_function() play\_sound()

---

## [ERROR "No module named sklearn" when using PyCall](https://discourse.julialang.org/t/error-no-module-named-sklearn-when-using-pycall/37427)

<div class="topic-metadata">

**Author:** [@aliceee](https://discourse.julialang.org/u/aliceee)\
**Replies:** 6\
**Last updated:** [April 12, 2020, 2:19am UTC](https://discourse.julialang.org/t/error-no-module-named-sklearn-when-using-pycall/37427 "2020-04-12T02:19:25Z")

</div>

Hi, I’m trying to use PyCall for some function defined in python. However, it keeps returning the ERROR “No module named sklearn” when I import python package sklearn. I’m pretty sure that sklearn works well with python…

---

## [Using \`isnan()\` with missing values leads to hard to find bugs](https://discourse.julialang.org/t/using-isnan-with-missing-values-leads-to-hard-to-find-bugs/37399)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 6\
**Last updated:** [April 12, 2020, 1:35am UTC](https://discourse.julialang.org/t/using-isnan-with-missing-values-leads-to-hard-to-find-bugs/37399 "2020-04-12T01:35:53Z")

</div>

I found some curious behavior when using the isnan()function on a dataframe with missing values the other day. I was trying to replace NaN values with missing values in the dataframe. However, I found that when I encou…

---

## [Details of the ArrayAndChar broadcasting example](https://discourse.julialang.org/t/details-of-the-arrayandchar-broadcasting-example/37218)

<div class="topic-metadata">

**Author:** [@thisrod](https://discourse.julialang.org/u/thisrod)\
**Replies:** 6\
**Last updated:** [April 12, 2020, 1:16am UTC](https://discourse.julialang.org/t/details-of-the-arrayandchar-broadcasting-example/37218 "2020-04-12T01:16:51Z")

</div>

The Julia manual uses a type ArrayAndChar as its example of how to customise broadcasting. Following a suggestion from @mcabbott, I’m implementing this for real. I’m running into a bunch of complications that the manual…

---

## [Minijyro - a toy Pyro-like PPL](https://discourse.julialang.org/t/minijyro-a-toy-pyro-like-ppl/37356)

<div class="topic-metadata">

**Author:** [@treichelt](https://discourse.julialang.org/u/treichelt)\
**Replies:** 5\
**Last updated:** [April 12, 2020, 1:00am UTC](https://discourse.julialang.org/t/minijyro-a-toy-pyro-like-ppl/37356 "2020-04-12T01:00:56Z")

</div>

Hi everyone, I implemented a small PPL, Minijyro.jl, that is based on the ideas of effect handlers in Pyro and thought it might be of interest to people. This project is mostly me trying to learn more about Julia and pr…

---

## [Is there a destructive version of logical indexing?](https://discourse.julialang.org/t/is-there-a-destructive-version-of-logical-indexing/37428)

<div class="topic-metadata">

**Author:** [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 12:58am UTC](https://discourse.julialang.org/t/is-there-a-destructive-version-of-logical-indexing/37428 "2020-04-12T00:58:00Z")

</div>

I often deal with both: (1) arrays of indexes of some other array; (2) bitmasks of some other array. I can use the array of indexes to delete positions inplace with: deleteat!(array, array\_of\_indexes\_of\_first\_array) b…

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

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