# General Usage

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

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

**Page:** 828

---

## [How to update a package before a new release is made](https://discourse.julialang.org/t/how-to-update-a-package-before-a-new-release-is-made/29375)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 4\
**Last updated:** [October 2, 2019, 1:31am UTC](https://discourse.julialang.org/t/how-to-update-a-package-before-a-new-release-is-made/29375 "2019-10-02T01:31:00Z")

</div>

I have opened an issue on AbstractAlgebra.jl and one of the maintainers apparently has committed a fix and closed the issue, however pkg\> update AbstractAlgebra does not push any update on my system. I guess this is be…

---

## [Doctests all variables "variable not found"](https://discourse.julialang.org/t/doctests-all-variables-variable-not-found/29378)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 4\
**Last updated:** [October 1, 2019, 9:03pm UTC](https://discourse.julialang.org/t/doctests-all-variables-variable-not-found/29378 "2019-10-01T21:03:31Z")

</div>

I’m stuck trying to run doctests; it seems that the module isn’t being loaded, but I’ve included what I think is the appropriate meta DocTestSetup block. I’ve been banging my head against this on and off for months, so …

---

## [Break execution after a given time](https://discourse.julialang.org/t/break-execution-after-a-given-time/29233)

<div class="topic-metadata">

**Author:** [@ethanminfang](https://discourse.julialang.org/u/ethanminfang)\
**Replies:** 5\
**Last updated:** [October 1, 2019, 8:47pm UTC](https://discourse.julialang.org/t/break-execution-after-a-given-time/29233 "2019-10-01T20:47:20Z")

</div>

Hi, I am optimization a function choosing different parameters. However, for some parameters, it will loop forever. So I want to set a timer like following: (just an example) function optim(theta) if run time of fu…

---

## [Is it possible to multiply with a derivative operator?](https://discourse.julialang.org/t/is-it-possible-to-multiply-with-a-derivative-operator/28914)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 24\
**Last updated:** [October 1, 2019, 4:20pm UTC](https://discourse.julialang.org/t/is-it-possible-to-multiply-with-a-derivative-operator/28914 "2019-10-01T16:20:16Z")

</div>

Say that I have: using SymEngine x=symbols(:x); y=symbols(:y); A = \[x y^2\] I know to find the x derivative I can say: diff.(A,x) 1×2 Array{Basic,2}: 1 0 My question is then; is it possible in any way to rewrite (in…

---

## [RCall and Debugger don't get along](https://discourse.julialang.org/t/rcall-and-debugger-dont-get-along/29368)

<div class="topic-metadata">

**Author:** [@PGS62](https://discourse.julialang.org/u/PGS62)\
**Replies:** 1\
**Last updated:** [October 1, 2019, 2:45pm UTC](https://discourse.julialang.org/t/rcall-and-debugger-dont-get-along/29368 "2019-10-01T14:45:16Z")

</div>

Hello, this is my first post on Discourse… I’m porting a library of functions from R to Julia (and getting significant speedups). So it’s handy to use RCall to test the R version of a function against the Julia version.…

---

## [Package Aliases?](https://discourse.julialang.org/t/package-aliases/29334)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 4\
**Last updated:** [October 1, 2019, 2:11pm UTC](https://discourse.julialang.org/t/package-aliases/29334 "2019-10-01T14:11:27Z")

</div>

It’s not uncommon that I use two packages that export functions with the same name so I’m wondering if we can define an alias for a package as you can do in other languages (e.g. import numpy as np). For example, today …

---

## [Julia crash with ErrorException("schedule: Task not runnable")](https://discourse.julialang.org/t/julia-crash-with-errorexception-schedule-task-not-runnable/29364)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 0\
**Last updated:** [October 1, 2019, 12:47pm UTC](https://discourse.julialang.org/t/julia-crash-with-errorexception-schedule-task-not-runnable/29364 "2019-10-01T12:47:13Z")

</div>

Confusing throwto with yieldto upsets Julia to the point of self-imploding. Known issue or should I open one? julia\> up() Web Server starting at http://127.0.0.1:8000 Web Server running at http://127.0.0.1:8000 Dict{Sym…

---

## [Client/Server TCP Hidden Error - is Julia reliable?](https://discourse.julialang.org/t/client-server-tcp-hidden-error-is-julia-reliable/29353)

<div class="topic-metadata">

**Author:** [@Wednesday](https://discourse.julialang.org/u/Wednesday)\
**Replies:** 17\
**Last updated:** [October 1, 2019, 11:22am UTC](https://discourse.julialang.org/t/client-server-tcp-hidden-error-is-julia-reliable/29353 "2019-10-01T11:22:47Z")

</div>

I have a server and a client, both written in Julia. I’m using the Sockets module from the standard Julia library. I have an issue on the client where I connect to a server and read from a server. I read from the socket…

---

## [Documenter.jl - Docs empty unless manually created? Old references to moved functions?](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 9\
**Last updated:** [October 1, 2019, 10:06am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304 "2019-10-01T10:06:29Z")

</div>

When I build my docs, references to an older version of my package documentation persists? Functions that were documented and refactored to other files are being displayed. Despite the old docs being deleted each time I …

---

## [PSA: Microbenchmarks remember branch history](https://discourse.julialang.org/t/psa-microbenchmarks-remember-branch-history/17436)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 36\
**Last updated:** [October 1, 2019, 8:08am UTC](https://discourse.julialang.org/t/psa-microbenchmarks-remember-branch-history/17436 "2019-10-01T08:08:13Z")

</div>

Something to keep in mind when running microbenchmarks: The sneaky CPU can remember astoundingly long branch history patterns. If you run @btime on somthing, then you generate a periodic branching pattern: The period len…

---

## [Automatic differentiation and \`abs()\` (or comparison operators in general) issues with JuMP/Ipopt](https://discourse.julialang.org/t/automatic-differentiation-and-abs-or-comparison-operators-in-general-issues-with-jump-ipopt/29333)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 4\
**Last updated:** [October 1, 2019, 7:13am UTC](https://discourse.julialang.org/t/automatic-differentiation-and-abs-or-comparison-operators-in-general-issues-with-jump-ipopt/29333 "2019-10-01T07:13:00Z")

</div>

I just scratched my head for a while because my super fast reconstruction algorithm suddenly took 100 times longer than usual after playing around with the quality function. Then I realised that the abs() function inside…

---

## [Yellow 'end' symbol + no colors in Atom](https://discourse.julialang.org/t/yellow-end-symbol-no-colors-in-atom/29140)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 5\
**Last updated:** [October 1, 2019, 6:44am UTC](https://discourse.julialang.org/t/yellow-end-symbol-no-colors-in-atom/29140 "2019-10-01T06:44:14Z")

</div>

Hi, I have two problem, but they might be connected. When I use Julia in Atom, the symbols are no longer colored when the line becomes too long. Any idea why? Also, sometimes I break a line and all the ‘end’ symbols in…

---

## [Zygote debugging](https://discourse.julialang.org/t/zygote-debugging/28423)

<div class="topic-metadata">

**Author:** [@HenrikM](https://discourse.julialang.org/u/HenrikM)\
**Replies:** 6\
**Last updated:** [October 1, 2019, 6:23am UTC](https://discourse.julialang.org/t/zygote-debugging/28423 "2019-10-01T06:23:05Z")

</div>

How to debug Zygote? Currently, when running gradient(fun, ω) I get the following error message below. What does it mean? How should I read it? Line 9 below refers to one of my functions, but the error is probably not…

---

## [Round() can anybody explain this behavior to me?](https://discourse.julialang.org/t/round-can-anybody-explain-this-behavior-to-me/29230)

<div class="topic-metadata">

**Author:** [@MatFi](https://discourse.julialang.org/u/MatFi)\
**Replies:** 18\
**Last updated:** [October 1, 2019, 5:37am UTC](https://discourse.julialang.org/t/round-can-anybody-explain-this-behavior-to-me/29230 "2019-10-01T05:37:03Z")

</div>

Just see (julia 1.2): julia\> round(1e24;digits=1) 9.999999999999998e23 julia\> round(1e24;sigdigits=1) 1.0e24 julia\> round(1e23;digits=1) 1.0e23 julia\> round(1e23;sigdigits=1) 1.0000000000000001e23 julia\> round(1e23;…

---

## [Interpolating along a single dimension of a multi dimensional array for particular points](https://discourse.julialang.org/t/interpolating-along-a-single-dimension-of-a-multi-dimensional-array-for-particular-points/29308)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 6\
**Last updated:** [September 30, 2019, 11:56pm UTC](https://discourse.julialang.org/t/interpolating-along-a-single-dimension-of-a-multi-dimensional-array-for-particular-points/29308 "2019-09-30T23:56:34Z")

</div>

I have some simple linear interpolation code in a package. It would be nice to support spline etc and not write that myself - but it has to be extremely fast and non-allocating at the point of use. It can take as long as…

---

## [Why making \`a\[range\] = b\[range\]\` seems to make unnecessary allocations?](https://discourse.julialang.org/t/why-making-a-range-b-range-seems-to-make-unnecessary-allocations/29325)

<div class="topic-metadata">

**Author:** [@pedrohnv](https://discourse.julialang.org/u/pedrohnv)\
**Replies:** 4\
**Last updated:** [September 30, 2019, 10:18pm UTC](https://discourse.julialang.org/t/why-making-a-range-b-range-seems-to-make-unnecessary-allocations/29325 "2019-09-30T22:18:33Z")

</div>

I was wondering why making a\[range\] = b\[range\] seems to make unnecessary allocations and if (why) that is intended. For example: function f!(a, b, n) a\[1:n, 1:n\] = b\[1:n, 1:n\] end function g!(a, b, n) copyto!(a…

---

## [Plots pyplot() export to pdf or eps (ERROR)](https://discourse.julialang.org/t/plots-pyplot-export-to-pdf-or-eps-error/29332)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 2\
**Last updated:** [September 30, 2019, 5:20pm UTC](https://discourse.julialang.org/t/plots-pyplot-export-to-pdf-or-eps-error/29332 "2019-09-30T17:20:10Z")

</div>

Hi, I am running a simple code and trying to save a plot created with pyplot() in pdf or eps. μs = log.(xs) σs = rand(length(xs)) plot(xs,μs,grid=false) When I try save("filename.pdf") the file is not saved. Only png …

---

## [Optimal way to make a line and column permutation copy of an array](https://discourse.julialang.org/t/optimal-way-to-make-a-line-and-column-permutation-copy-of-an-array/29331)

<div class="topic-metadata">

**Author:** [@pedrohnv](https://discourse.julialang.org/u/pedrohnv)\
**Replies:** 0\
**Last updated:** [September 30, 2019, 3:26pm UTC](https://discourse.julialang.org/t/optimal-way-to-make-a-line-and-column-permutation-copy-of-an-array/29331 "2019-09-30T15:26:24Z")

</div>

How can I optimize the following functions that copy a line-, column- or both- permutation (pl, pc, pcl, respectively) of a src array into a dest array? In particular, can the temp array be avoided in pcl? using Benchm…

---

## [Eliminate NaN tuples from dictionary](https://discourse.julialang.org/t/eliminate-nan-tuples-from-dictionary/29329)

<div class="topic-metadata">

**Author:** [@Rasoul](https://discourse.julialang.org/u/Rasoul)\
**Replies:** 1\
**Last updated:** [September 30, 2019, 3:35pm UTC](https://discourse.julialang.org/t/eliminate-nan-tuples-from-dictionary/29329 "2019-09-30T15:35:22Z")

</div>

Hi All, I want to eliminate (NaN, NaN) tuple form the blow dictionary. Can you please let me know how I can do this. Thanks in advance! intersection\[(6, 9)\]=Any\[(1.0, -0.295491), (0.866025, -0.34202), (0.866025, -0.342…

---

## [BLAS.gemm on views of matrices does not work](https://discourse.julialang.org/t/blas-gemm-on-views-of-matrices-does-not-work/29306)

<div class="topic-metadata">

**Author:** [@MaximilianJHuber](https://discourse.julialang.org/u/MaximilianJHuber)\
**Replies:** 2\
**Last updated:** [September 30, 2019, 2:49pm UTC](https://discourse.julialang.org/t/blas-gemm-on-views-of-matrices-does-not-work/29306 "2019-09-30T14:49:45Z")

</div>

I am not sure if this should work: using LinearAlgebra BLAS.gemm('N', 'N', @view(zeros(10,10)\[:, 1:3:10\]), @view(zeros(10,20)\[1:3:10,:\])) It fails with ERROR: matrix does not have contiguous columns. However, so does B…

---

## [Custom Array Performance Issues](https://discourse.julialang.org/t/custom-array-performance-issues/29191)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 8\
**Last updated:** [September 30, 2019, 9:07am UTC](https://discourse.julialang.org/t/custom-array-performance-issues/29191 "2019-09-30T09:07:57Z")

</div>

Hello, I have the following example of a custom array and I do not know why there is a nearly factor 2 overhead in the performance for my custom array type MyArray using BenchmarkTools struct MyArray{T,N} \<: AbstractAr…

---

## [Specialization tips to shrink 45x performance gap when comparing structs](https://discourse.julialang.org/t/specialization-tips-to-shrink-45x-performance-gap-when-comparing-structs/29249)

<div class="topic-metadata">

**Author:** [@milesf](https://discourse.julialang.org/u/milesf)\
**Replies:** 7\
**Last updated:** [September 30, 2019, 6:24am UTC](https://discourse.julialang.org/t/specialization-tips-to-shrink-45x-performance-gap-when-comparing-structs/29249 "2019-09-30T06:24:37Z")

</div>

I’m seeking tips on how to improve performance of struct comparisons where the specific comparison rule is selected at runtime. I have a struct with n fields, and I’d like to sort by each field in either order. Perform…

---

## [Documenter.jl - Warnings could use advice](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 5\
**Last updated:** [September 29, 2019, 10:49pm UTC](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299 "2019-09-29T22:49:11Z")

</div>

Hey all I need some help understanding how to fix some warnings in my documentation. I see a lot of these: ┌ Warning: Replacing docs for \`ChemometricsTools.Center :: Tuple{Any}\` in module \`ChemometricsTools\` └ @ Base.…

---

## [Can't precompile dependencies to newly created packages](https://discourse.julialang.org/t/cant-precompile-dependencies-to-newly-created-packages/29294)

<div class="topic-metadata">

**Author:** [@sairus7](https://discourse.julialang.org/u/sairus7)\
**Replies:** 1\
**Last updated:** [September 29, 2019, 10:04pm UTC](https://discourse.julialang.org/t/cant-precompile-dependencies-to-newly-created-packages/29294 "2019-09-29T22:04:31Z")

</div>

I’m trying to add package dedendency to newly generated package environment, and if that depencency was not added to my main julia environment, using new package from main environment fails to precompile it. (Windows 10,…

---

## [Receiving data from channel without storing](https://discourse.julialang.org/t/receiving-data-from-channel-without-storing/29277)

<div class="topic-metadata">

**Author:** [@alequa](https://discourse.julialang.org/u/alequa)\
**Replies:** 0\
**Last updated:** [September 28, 2019, 10:34pm UTC](https://discourse.julialang.org/t/receiving-data-from-channel-without-storing/29277 "2019-09-28T22:34:35Z")

</div>

Hi, I am receiving a tuple from a channel, (a remote channel to be precise) and I would like to add those data to a particular data structure I have. This data structure is composed of arrays, and I would like to appen…

---

## [ERROR: UndefVarError: AbstractEnsembleSolution not defined](https://discourse.julialang.org/t/error-undefvarerror-abstractensemblesolution-not-defined/29283)

<div class="topic-metadata">

**Author:** [@Matthew\_Overlin](https://discourse.julialang.org/u/Matthew_Overlin)\
**Replies:** 1\
**Last updated:** [September 29, 2019, 4:48am UTC](https://discourse.julialang.org/t/error-undefvarerror-abstractensemblesolution-not-defined/29283 "2019-09-29T04:48:27Z")

</div>

Hello. I get this error when I run this line: result = Optim.optimize(obj, \[1.0,0.5\], Optim.BFGS()). I am following an example at this web page: https://docs.juliadiffeq.org/latest/analysis/parameter\_estimation.html I…

---

## [Unable to precompile ParameterizedFunctions](https://discourse.julialang.org/t/unable-to-precompile-parameterizedfunctions/29284)

<div class="topic-metadata">

**Author:** [@Matthew\_Overlin](https://discourse.julialang.org/u/Matthew_Overlin)\
**Replies:** 0\
**Last updated:** [September 29, 2019, 4:10am UTC](https://discourse.julialang.org/t/unable-to-precompile-parameterizedfunctions/29284 "2019-09-29T04:10:35Z")

</div>

ERROR: LoadError: Failed to precompile ParameterizedFunctions \[65888b18-ceab-5e60-b2b9-181511a3b968\] to C:\\Users\\mover.julia\\compiled\\v1.1\\ParameterizedFunctions\\OKjOc.ji. I get the above message at the line “using Para…

---

## [Inserting global list to a function, change the global list](https://discourse.julialang.org/t/inserting-global-list-to-a-function-change-the-global-list/29275)

<div class="topic-metadata">

**Author:** [@Tamuzd](https://discourse.julialang.org/u/Tamuzd)\
**Replies:** 4\
**Last updated:** [September 29, 2019, 2:13am UTC](https://discourse.julialang.org/t/inserting-global-list-to-a-function-change-the-global-list/29275 "2019-09-29T02:13:47Z")

</div>

I have an information on a global list variables. I want to use this information and make some manipulation with it. But I don’t want to change this global list. Right now any manipulation I make change this global list.…

---

## [Visibility of new methods in a recursive function](https://discourse.julialang.org/t/visibility-of-new-methods-in-a-recursive-function/29248)

<div class="topic-metadata">

**Author:** [@adrpo](https://discourse.julialang.org/u/adrpo)\
**Replies:** 2\
**Last updated:** [September 28, 2019, 6:12pm UTC](https://discourse.julialang.org/t/visibility-of-new-methods-in-a-recursive-function/29248 "2019-09-28T18:12:13Z")

</div>

Any ideas why this doesn’t work? The call to StringSorting.quicksort! sees all the methods of keyCompare until the recursive call to quicksort! when it just doesn’t anymore as it seems to call String.keyCompare without …

---

## [Create Gurobi environment in module](https://discourse.julialang.org/t/create-gurobi-environment-in-module/29261)

<div class="topic-metadata">

**Author:** [@aahaselgrove](https://discourse.julialang.org/u/aahaselgrove)\
**Replies:** 1\
**Last updated:** [September 28, 2019, 11:03am UTC](https://discourse.julialang.org/t/create-gurobi-environment-in-module/29261 "2019-09-28T11:03:19Z")

</div>

I am working on a project in a module which I reference from a Jupyter notebook. As discussed here, I tried initialising the Gurobi environment with const GRB\_ENV = Gurobi.Env(). It seems to initialise successfully as th…

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

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