# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=767

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

**Page:** 768

---

## [How to use sysimage in jupyter?](https://discourse.julialang.org/t/how-to-use-sysimage-in-jupyter/37207)

<div class="topic-metadata">

**Author:** [@phelipe](https://discourse.julialang.org/u/phelipe)\
**Replies:** 6\
**Last updated:** [April 8, 2020, 5:00pm UTC](https://discourse.julialang.org/t/how-to-use-sysimage-in-jupyter/37207 "2020-04-08T17:00:43Z")

</div>

How to use custom julia sysimage in jupyter?

---

## [Standard package not found in current path when using Pkg environment](https://discourse.julialang.org/t/standard-package-not-found-in-current-path-when-using-pkg-environment/14662)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 3\
**Last updated:** [April 8, 2020, 3:31pm UTC](https://discourse.julialang.org/t/standard-package-not-found-in-current-path-when-using-pkg-environment/14662 "2020-04-08T15:31:31Z")

</div>

Hi all, I’m just in the final stages of updating a package for v1.0 (I’m currently testing it on v0.7). My problem is as follows. I start up a fresh REPL session, an hit \] to start the package mode. I activate my packag…

---

## [Unexpected OutOfMemory error on HPC](https://discourse.julialang.org/t/unexpected-outofmemory-error-on-hpc/37190)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 17\
**Last updated:** [April 8, 2020, 2:43pm UTC](https://discourse.julialang.org/t/unexpected-outofmemory-error-on-hpc/37190 "2020-04-08T14:43:55Z")

</div>

Hello, I am using an HPC cluster to run a code that involves solving 2 huge sparse linear systems. I was able to test the code on my windows machine with 16GB memory. I used the macro @time to monitor the memory allocat…

---

## [Dispatch on NamedTuple](https://discourse.julialang.org/t/dispatch-on-namedtuple/37154)

<div class="topic-metadata">

**Author:** [@corbat](https://discourse.julialang.org/u/corbat)\
**Replies:** 3\
**Last updated:** [April 8, 2020, 1:06pm UTC](https://discourse.julialang.org/t/dispatch-on-namedtuple/37154 "2020-04-08T13:06:50Z")

</div>

Hi, I was wondering if there is a way to dispatch on NamedTuple function arguments based on the types used within the NamedTuple without knowing the number of elements inside but with all elements having the same type. …

---

## [Is it possible to know if module is imported from another one?](https://discourse.julialang.org/t/is-it-possible-to-know-if-module-is-imported-from-another-one/37224)

<div class="topic-metadata">

**Author:** [@abulak](https://discourse.julialang.org/u/abulak)\
**Replies:** 0\
**Last updated:** [April 8, 2020, 8:54am UTC](https://discourse.julialang.org/t/is-it-possible-to-know-if-module-is-imported-from-another-one/37224 "2020-04-08T08:54:56Z")

</div>

As in the topic, I’d like to execute some code (e.g. in \_\_init\_) based on the information that my module has not been used/imported into Main. I tried parentmodule and Base.moduleroot etc. but since Main is no longer spe…

---

## [Has Plots interface changed?](https://discourse.julialang.org/t/has-plots-interface-changed/37213)

<div class="topic-metadata">

**Author:** [@Jerry](https://discourse.julialang.org/u/Jerry)\
**Replies:** 0\
**Last updated:** [April 8, 2020, 4:31am UTC](https://discourse.julialang.org/t/has-plots-interface-changed/37213 "2020-04-08T04:31:51Z")

</div>

In Julia 1.2 with an unknown but presumably up-to-date version of Plots, I wrote plot(\[cos sin\]) to get cosine and sine plots from an adaptive plotter. Yesterday I upgraded to Julia 1.4 and now apparently Plots version…

---

## [GLMakie.jl install error](https://discourse.julialang.org/t/glmakie-jl-install-error/37141)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 2\
**Last updated:** [April 8, 2020, 1:31am UTC](https://discourse.julialang.org/t/glmakie-jl-install-error/37141 "2020-04-08T01:31:14Z")

</div>

I got the following error when I try to compile GLMakie.jl julia\> using GLMakie \[ Info: Precompiling GLMakie \[e9467ef8-e4e7-5192-8a1a-b1aee30e663a\] ERROR: LoadError: could not open file /home/liye/.julia/packages/GLMaki…

---

## [Embedding Julia in VC++](https://discourse.julialang.org/t/embedding-julia-in-vc/36939)

<div class="topic-metadata">

**Author:** [@algogp](https://discourse.julialang.org/u/algogp)\
**Replies:** 10\
**Last updated:** [April 8, 2020, 12:38am UTC](https://discourse.julialang.org/t/embedding-julia-in-vc/36939 "2020-04-08T00:38:47Z")

</div>

I am following the instruction here https://docs.julialang.org/en/v1/manual/embedding/index.html#Calling-Julia-Functions-1 using VS 2019. I am able to build and run up to the “Converting Types” section; but for “Callin…

---

## [Calling an overridden function in an overriding function](https://discourse.julialang.org/t/calling-an-overridden-function-in-an-overriding-function/37196)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 1\
**Last updated:** [April 7, 2020, 9:11pm UTC](https://discourse.julialang.org/t/calling-an-overridden-function-in-an-overriding-function/37196 "2020-04-07T21:11:11Z")

</div>

Suppose a function is defined for an abstract type (say AbstractMyType), and it is overridden for a concrete subtype (say MyType\<:AbstractMyType). The overriding function does extra work on top of the work implemented i…

---

## [Update matrix block inplace from a sparse array](https://discourse.julialang.org/t/update-matrix-block-inplace-from-a-sparse-array/36360)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 2\
**Last updated:** [April 7, 2020, 8:30pm UTC](https://discourse.julialang.org/t/update-matrix-block-inplace-from-a-sparse-array/36360 "2020-04-07T20:30:47Z")

</div>

Hi, Edit: sounds like it is related to BlockSparseMatrices.jl although the docs are quite minimal I have a sparse matrix a which is made of blocks (a few). using SparseArrays, LinearAlgebra N = 100 # this is a compl…

---

## [Flux LSTM format of input train data](https://discourse.julialang.org/t/flux-lstm-format-of-input-train-data/37187)

<div class="topic-metadata">

**Author:** [@Owolf](https://discourse.julialang.org/u/Owolf)\
**Replies:** 0\
**Last updated:** [April 7, 2020, 7:10pm UTC](https://discourse.julialang.org/t/flux-lstm-format-of-input-train-data/37187 "2020-04-07T19:10:15Z")

</div>

Hello community, I am trying to create easy example using LSTM model. The idea is that model should predict sinus signal. I expected that it is really easy task and it will be done in second. However I am still not able…

---

## [Sync/keepalive for Blink.jl/Interact.jl?](https://discourse.julialang.org/t/sync-keepalive-for-blink-jl-interact-jl/21393)

<div class="topic-metadata">

**Author:** [@mlhetland](https://discourse.julialang.org/u/mlhetland)\
**Replies:** 6\
**Last updated:** [April 7, 2020, 6:14pm UTC](https://discourse.julialang.org/t/sync-keepalive-for-blink-jl-interact-jl/21393 "2020-04-07T18:14:31Z")

</div>

I’m sure I just haven’t been good enough at reading the docs/source, but I can’t seem to find any obviously canonical way of using Blink.jl without having it quit immediately. I mean, I could use it from the REPL, but ot…

---

## [Sum operations between arrays](https://discourse.julialang.org/t/sum-operations-between-arrays/37066)

<div class="topic-metadata">

**Author:** [@jmaffi](https://discourse.julialang.org/u/jmaffi)\
**Replies:** 21\
**Last updated:** [April 7, 2020, 4:33pm UTC](https://discourse.julialang.org/t/sum-operations-between-arrays/37066 "2020-04-07T16:33:46Z")

</div>

Hello there, I was wondering if you knew how to efficiently compute the following matrices in Julia. In Matlab I am getting the result 3-6x faster than in Julia, which makes me think that there is room for improvement p…

---

## [Need advice on release numbering](https://discourse.julialang.org/t/need-advice-on-release-numbering/37140)

<div class="topic-metadata">

**Author:** [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Replies:** 6\
**Last updated:** [April 7, 2020, 4:20pm UTC](https://discourse.julialang.org/t/need-advice-on-release-numbering/37140 "2020-04-07T16:20:29Z")

</div>

LightGraphs is currently at v1.3.1. We’ve made some really big changes to the LightGraphs API in the master branch, and have added deprecation warnings for all old functions. The deprecation warnings apply to almost all …

---

## [Capture local variables to keyword arguments](https://discourse.julialang.org/t/capture-local-variables-to-keyword-arguments/37167)

<div class="topic-metadata">

**Author:** [@A\_Dent](https://discourse.julialang.org/u/A_Dent)\
**Replies:** 5\
**Last updated:** [April 7, 2020, 2:54pm UTC](https://discourse.julialang.org/t/capture-local-variables-to-keyword-arguments/37167 "2020-04-07T14:54:25Z")

</div>

Hi! I’m working on a machine learning project in multiple steps. Each step may require as input the output of some of the previous steps. I’m doing everything in a functional, immutable style, using keyword arguments …

---

## [Praise + widening the scope](https://discourse.julialang.org/t/praise-widening-the-scope/37166)

<div class="topic-metadata">

**Author:** [@mhinsch](https://discourse.julialang.org/u/mhinsch)\
**Replies:** 0\
**Last updated:** [April 7, 2020, 1:38pm UTC](https://discourse.julialang.org/t/praise-widening-the-scope/37166 "2020-04-07T13:38:17Z")

</div>

After nearly two years of nearly exclusively using Julia (apart from occasional misc scripting), I’ve recently started a fun cross-platform game project in my off-time using Dart and Flutter. That made me realize two thi…

---

## [Defining a type that behaves like a (const) function](https://discourse.julialang.org/t/defining-a-type-that-behaves-like-a-const-function/37162)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 3\
**Last updated:** [April 7, 2020, 12:45pm UTC](https://discourse.julialang.org/t/defining-a-type-that-behaves-like-a-const-function/37162 "2020-04-07T12:45:24Z")

</div>

Dear community, I’m trying to define a type that behaves as a function. The usual way is something like struct T z::Int end (t::T)(x) = x \* t.z Then, if t = T(2) we have t(3) == 6. However there is one way in w…

---

## [Reshape of numbers. Is it a bad idea?](https://discourse.julialang.org/t/reshape-of-numbers-is-it-a-bad-idea/37151)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [April 7, 2020, 9:13am UTC](https://discourse.julialang.org/t/reshape-of-numbers-is-it-a-bad-idea/37151 "2020-04-07T09:13:23Z")

</div>

I have a function when I want to be sure one parameter is a vector, even if it is given as number. I thought to use reshape(myInt,1) but notice reshape of numbers is not in Base. No problem, I can add a method to handl…

---

## [Unable to call a distributed array in a parallel subprocess](https://discourse.julialang.org/t/unable-to-call-a-distributed-array-in-a-parallel-subprocess/37131)

<div class="topic-metadata">

**Author:** [@Diego](https://discourse.julialang.org/u/Diego)\
**Replies:** 1\
**Last updated:** [April 7, 2020, 7:31am UTC](https://discourse.julialang.org/t/unable-to-call-a-distributed-array-in-a-parallel-subprocess/37131 "2020-04-07T07:31:33Z")

</div>

Dear Julia team, I am trying to edit a distributed array from a function running in a separate process. The problem is that from inside the function the distributed array is not defined (see below). I have also tried …

---

## [Access nested dependency \`A.B\` without triggering \`A.\_\_init\_\_()\`](https://discourse.julialang.org/t/access-nested-dependency-a-b-without-triggering-a-init/37137)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 0\
**Last updated:** [April 7, 2020, 1:58am UTC](https://discourse.julialang.org/t/access-nested-dependency-a-b-without-triggering-a-init/37137 "2020-04-07T01:58:07Z")

</div>

Example: I have expressed a dependency on PyPlot, and I want to access PyCall (which is a dependency of PyPlot. I can do import PyPlot; PyPlot.PyCall, but that triggers PyPlot.\_\_init\_\_(). Is there a way to access PyCall …

---

## [I have an array of 31 arrays and would like to make it a DataFrame. Need some help](https://discourse.julialang.org/t/i-have-an-array-of-31-arrays-and-would-like-to-make-it-a-dataframe-need-some-help/37130)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 4\
**Last updated:** [April 6, 2020, 10:21pm UTC](https://discourse.julialang.org/t/i-have-an-array-of-31-arrays-and-would-like-to-make-it-a-dataframe-need-some-help/37130 "2020-04-06T22:21:17Z")

</div>

Hi how’s it going, I have an array of 31 arrays, each with 3 items in it. first two items are strings, third is a float. I just want to transform this into a Julia DataFrame and export to CSV. Just calling the DataFrame…

---

## [\`@ref\` across files in Documenter.jl](https://discourse.julialang.org/t/ref-across-files-in-documenter-jl/37110)

<div class="topic-metadata">

**Author:** [@crinders](https://discourse.julialang.org/u/crinders)\
**Replies:** 2\
**Last updated:** [April 6, 2020, 10:59pm UTC](https://discourse.julialang.org/t/ref-across-files-in-documenter-jl/37110 "2020-04-06T22:59:39Z")

</div>

I have split my module into multiple files. I want to cross reference across files. index.md: # A \`\`\`@autodocs Pages = \[ "A.jl" \] Modules = \[ MyModule \] \` \`\` # B \`\`\`@autodocs Pages = \[ "B.jl" \] Modules = \[ MyModule \]…

---

## [DifferentialEquations & Plots -- transforming solutions before plot](https://discourse.julialang.org/t/differentialequations-plots-transforming-solutions-before-plot/37122)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 0\
**Last updated:** [April 6, 2020, 5:51pm UTC](https://discourse.julialang.org/t/differentialequations-plots-transforming-solutions-before-plot/37122 "2020-04-06T17:51:00Z")

</div>

I have computed sol from DifferentialEquations, and need to transform selected values before plotting them. Specifically, I want to convert values from fraction to percentage (f2p). Suppose I want transform a single var…

---

## [How i can get random number as numpy.random.randn()](https://discourse.julialang.org/t/how-i-can-get-random-number-as-numpy-random-randn/37120)

<div class="topic-metadata">

**Author:** [@Neeraj\_Verma\_ASETRAI](https://discourse.julialang.org/u/Neeraj_Verma_ASETRAI)\
**Replies:** 1\
**Last updated:** [April 6, 2020, 5:17pm UTC](https://discourse.julialang.org/t/how-i-can-get-random-number-as-numpy-random-randn/37120 "2020-04-06T17:17:45Z")

</div>

How i can get output as numpy for generating random numbers which is closer to both 0 and 1 in Float64 n = np.random.randn() code in python import numpy as np for i in range(10): n = np.random.randn() print(n) O…

---

## [Problem solving a simple SDP in ProximalAlgorithms.jl](https://discourse.julialang.org/t/problem-solving-a-simple-sdp-in-proximalalgorithms-jl/37118)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 0\
**Last updated:** [April 6, 2020, 4:50pm UTC](https://discourse.julialang.org/t/problem-solving-a-simple-sdp-in-proximalalgorithms-jl/37118 "2020-04-06T16:50:53Z")

</div>

Dear All, I am having issues running the following trivial problem in ProximalAlgorithms.jl: using ProximalAlgorithms, ProximalOperators # optimization problem: # minimize || X ||\_{\*} // nuclear norm # subject to X \>=…

---

## [Is there a way to traverse the indices of @polyvar p11 p12...pnn](https://discourse.julialang.org/t/is-there-a-way-to-traverse-the-indices-of-polyvar-p11-p12-pnn/37096)

<div class="topic-metadata">

**Author:** [@Yusen\_Liu](https://discourse.julialang.org/u/Yusen_Liu)\
**Replies:** 5\
**Last updated:** [April 6, 2020, 3:39pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-traverse-the-indices-of-polyvar-p11-p12-pnn/37096 "2020-04-06T15:39:04Z")

</div>

Hi all, I’ve been stuck with a problem traversing the indices of @polyvar. My code is as follows @polyvar p11 p12 p13 p21 p22 p23 p31 p32 p33 which is a way to declare 9 polyvars of a 3x3 matrix. Since there are only …

---

## [ForwardDiff - slowed down by Real vs. Float operations](https://discourse.julialang.org/t/forwarddiff-slowed-down-by-real-vs-float-operations/36987)

<div class="topic-metadata">

**Author:** [@danicaratelli](https://discourse.julialang.org/u/danicaratelli)\
**Replies:** 13\
**Last updated:** [April 6, 2020, 1:36pm UTC](https://discourse.julialang.org/t/forwarddiff-slowed-down-by-real-vs-float-operations/36987 "2020-04-06T13:36:24Z")

</div>

Hello, I am using ForwardDiff to solve a minimization problem. Following the suggestions I read, I need to specify what were my Float64 arrays as Real arrays. I do so and my code works! However, it is really slow compar…

---

## [@async read(stdin, Char)](https://discourse.julialang.org/t/async-read-stdin-char/36942)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 7\
**Last updated:** [April 6, 2020, 12:42pm UTC](https://discourse.julialang.org/t/async-read-stdin-char/36942 "2020-04-06T12:42:23Z")

</div>

I want to listen on the stdin but my module stucks loading. I see kinda the problem. Is there a way around? module T t() = @async while true read(stdin, Char) end t() end

---

## [Julia PlotlyJS block show plot, update plot](https://discourse.julialang.org/t/julia-plotlyjs-block-show-plot-update-plot/37104)

<div class="topic-metadata">

**Author:** [@Xeno](https://discourse.julialang.org/u/Xeno)\
**Replies:** 0\
**Last updated:** [April 6, 2020, 11:15am UTC](https://discourse.julialang.org/t/julia-plotlyjs-block-show-plot-update-plot/37104 "2020-04-06T11:15:08Z")

</div>

I’m trying to include a plot using the PlotlyJS package in a small application using Blink. So far, whenever I use the plot function, it opens a new window, which I want to avoid… Furthermore, when updating the plot, ano…

---

## [How to estimate the jacobian matrix of the ODE systems at end solutions](https://discourse.julialang.org/t/how-to-estimate-the-jacobian-matrix-of-the-ode-systems-at-end-solutions/37099)

<div class="topic-metadata">

**Author:** [@yanriver](https://discourse.julialang.org/u/yanriver)\
**Replies:** 0\
**Last updated:** [April 6, 2020, 7:59am UTC](https://discourse.julialang.org/t/how-to-estimate-the-jacobian-matrix-of-the-ode-systems-at-end-solutions/37099 "2020-04-06T07:59:26Z")

</div>

Hello, I am a R user, and just start to learn Julia. I used to use R ‘desolve’ package to solve systems of ODEs, but the speed of Julia ‘DifferentialEquations’ make me switch to Julia to handle some large systems. My qu…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=766)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=768)
