# General Usage

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

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

**Page:** 575

---

## [Distributed Differential Equations with large matrix](https://discourse.julialang.org/t/distributed-differential-equations-with-large-matrix/64665)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 12\
**Last updated:** [July 16, 2021, 7:11pm UTC](https://discourse.julialang.org/t/distributed-differential-equations-with-large-matrix/64665 "2021-07-16T19:11:07Z")

</div>

Hello, I’m trying to increase the performances for my differential equation system, where the differential function is function drho\_dt(rho, p, t) global L, L\_t A, w\_l = p return (L + A \* sin(w\_l \* t) \* L\_t…

---

## [Messed up environment UUID?](https://discourse.julialang.org/t/messed-up-environment-uuid/64651)

<div class="topic-metadata">

**Author:** [@orome](https://discourse.julialang.org/u/orome)\
**Replies:** 5\
**Last updated:** [July 16, 2021, 3:41pm UTC](https://discourse.julialang.org/t/messed-up-environment-uuid/64651 "2021-07-16T15:41:27Z")

</div>

I’ve got some weird behavior with an environment: I renamed a file in the environment’s src and subsequently every time I tried to add or dev any other package with the project activated, I got an error: ERROR: expected…

---

## [Cannot install NBInclude](https://discourse.julialang.org/t/cannot-install-nbinclude/64743)

<div class="topic-metadata">

**Author:** [@Annette\_F](https://discourse.julialang.org/u/Annette_F)\
**Replies:** 2\
**Last updated:** [July 16, 2021, 12:36pm UTC](https://discourse.julialang.org/t/cannot-install-nbinclude/64743 "2021-07-16T12:36:01Z")

</div>

Hello, I’ve got a large program to write in Julia in Jupyter notebooks; so I’d like to split the code over various notebooks. It looks as though I would be able to manage this with the NBInclude package; except I don’t…

---

## [LoggingExtras.jl -\> Get STRING from LOGGING MACRO](https://discourse.julialang.org/t/loggingextras-jl-get-string-from-logging-macro/64731)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 4\
**Last updated:** [July 16, 2021, 10:23am UTC](https://discourse.julialang.org/t/loggingextras-jl-get-string-from-logging-macro/64731 "2021-07-16T10:23:59Z")

</div>

How can I get string message from log macro? @info "My message" I used FormatLogger so output looks like: 2021-07-16 --- My message --- INFO --- Main.module I would liek to get this full message as a string. How is i…

---

## [A nice use case for DataFrames.jl - flexible dedup](https://discourse.julialang.org/t/a-nice-use-case-for-dataframes-jl-flexible-dedup/64725)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 4\
**Last updated:** [July 16, 2021, 7:53am UTC](https://discourse.julialang.org/t/a-nice-use-case-for-dataframes-jl-flexible-dedup/64725 "2021-07-16T07:53:34Z")

</div>

I had this problem where I need to dedup a dataframe using a column, but there is a timestamp column for all the entries. If two entries have the same data, but different timestamp, I would want ot keep only the one with…

---

## [LoggingExtras.jl - How to add custom log macro](https://discourse.julialang.org/t/loggingextras-jl-how-to-add-custom-log-macro/64679)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 8\
**Last updated:** [July 16, 2021, 7:34am UTC](https://discourse.julialang.org/t/loggingextras-jl-how-to-add-custom-log-macro/64679 "2021-07-16T07:34:34Z")

</div>

@debug, @info, @warn, @error are by default, I would like to add log macro, f.e. @fatal. How can I do it with LoggingExtras.jl? @fredrikekre Thank you I only tried following code (did not work for LoggingExtras.jl): ma…

---

## [Weave.jl generating tables for the pdf doctype](https://discourse.julialang.org/t/weave-jl-generating-tables-for-the-pdf-doctype/64716)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 0\
**Last updated:** [July 15, 2021, 8:14pm UTC](https://discourse.julialang.org/t/weave-jl-generating-tables-for-the-pdf-doctype/64716 "2021-07-15T20:14:40Z")

</div>

I am having an hard time generating tables with Weave.jl using the pdf doctype. For the html doctype i can generate decent tables using PrettyTables.jl. While most options of PrettyTables do not work in Weave, i can at l…

---

## [Sql Server connection string in ODBC.jl](https://discourse.julialang.org/t/sql-server-connection-string-in-odbc-jl/50367)

<div class="topic-metadata">

**Author:** [@Cristian\_Suciava](https://discourse.julialang.org/u/Cristian_Suciava)\
**Replies:** 2\
**Last updated:** [July 16, 2021, 4:45am UTC](https://discourse.julialang.org/t/sql-server-connection-string-in-odbc-jl/50367 "2021-07-16T04:45:39Z")

</div>

I use this code to connect to a Sql Server database, with no credentials All good! ODBC.adddsn("SQL\_Server\_DSN", "SQL Server"; SERVER="x", DATABASE ="x", Trusted\_Connection="True") conn = DBInterface.connect(ODBC…

---

## [Problem with fitting Beta distribution](https://discourse.julialang.org/t/problem-with-fitting-beta-distribution/64719)

<div class="topic-metadata">

**Author:** [@Taylor\_Dinkins](https://discourse.julialang.org/u/Taylor_Dinkins)\
**Replies:** 1\
**Last updated:** [July 15, 2021, 10:18pm UTC](https://discourse.julialang.org/t/problem-with-fitting-beta-distribution/64719 "2021-07-15T22:18:08Z")

</div>

Trying to do a simple distribution fitting with Distributions package throws me an error. I’ve been able to get it working with various other distributions, including Dirichlet and Binomial, but can’t for Beta. I’m doing…

---

## [Understanding Julia's type system](https://discourse.julialang.org/t/understanding-julias-type-system/64709)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 2\
**Last updated:** [July 15, 2021, 8:36pm UTC](https://discourse.julialang.org/t/understanding-julias-type-system/64709 "2021-07-15T20:36:07Z")

</div>

I want to describe two kinds of state vectors: CartesianState and KeplerianState. For convenience, I’d like to have these state vectors to be mutable and have labels via LabelledArrays. Now, I’d like to be able to use m…

---

## [Julia could not load dynamic library error when called from Python](https://discourse.julialang.org/t/julia-could-not-load-dynamic-library-error-when-called-from-python/64714)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 0\
**Last updated:** [July 15, 2021, 8:08pm UTC](https://discourse.julialang.org/t/julia-could-not-load-dynamic-library-error-when-called-from-python/64714 "2021-07-15T20:08:09Z")

</div>

I have some Python code calling a Julia function via PythonCall.jl. The Julia function is defined in a module that uses several Julia packages and Pango.jl is a dependency. The line import rasterio in the Python code t…

---

## [Running documenter locally no longer seems to populate the build directory](https://discourse.julialang.org/t/running-documenter-locally-no-longer-seems-to-populate-the-build-directory/64711)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 0\
**Last updated:** [July 15, 2021, 7:25pm UTC](https://discourse.julialang.org/t/running-documenter-locally-no-longer-seems-to-populate-the-build-directory/64711 "2021-07-15T19:25:07Z")

</div>

I just tried to build a local version of the docs for a package using a method that I believe has succeeded in the past. I start julia (v1.6.2) in the docs subdirectory, Pkd.add the parent directory, Pkg.update() then i…

---

## [Distributed code loading inside modules](https://discourse.julialang.org/t/distributed-code-loading-inside-modules/62334)

<div class="topic-metadata">

**Author:** [@Uroc327](https://discourse.julialang.org/u/Uroc327)\
**Replies:** 8\
**Last updated:** [July 15, 2021, 6:58pm UTC](https://discourse.julialang.org/t/distributed-code-loading-inside-modules/62334 "2021-07-15T18:58:10Z")

</div>

I want to move a function that’s defined in a script into my module. The function is something like function test(x) map(\[x\]) do info eval(macroexpand(Distributed, quote @everywhere using Distributions end)) @eve…

---

## [List generation (array of arrays)](https://discourse.julialang.org/t/list-generation-array-of-arrays/64693)

<div class="topic-metadata">

**Author:** [@Cyber](https://discourse.julialang.org/u/Cyber)\
**Replies:** 18\
**Last updated:** [July 15, 2021, 6:28pm UTC](https://discourse.julialang.org/t/list-generation-array-of-arrays/64693 "2021-07-15T18:28:08Z")

</div>

Hello there, I was wondering how could we bulid a list like this: I have a array x = \[1,2,3,4\] and y = \[5,6,7,8\] and now I would like to come up a new array like z = \[ \[1,5\], \[2,6\], \[3,7\], \[4,8\] \] to reflects t…

---

## [Vector in 3 space](https://discourse.julialang.org/t/vector-in-3-space/64701)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 6\
**Last updated:** [July 15, 2021, 5:24pm UTC](https://discourse.julialang.org/t/vector-in-3-space/64701 "2021-07-15T17:24:39Z")

</div>

I’m trying to define a vector in 3 dimensional space for a geometry application. I can define const Vec3 = Array{Number, 3} Vec3(x::Number, y::Number, z::Number) = Array{Number, 3}(x, y, z) in the REPL and call Vec3 …

---

## [Compat section in Project.toml: Do I need to include the compat of my dependencies?](https://discourse.julialang.org/t/compat-section-in-project-toml-do-i-need-to-include-the-compat-of-my-dependencies/64691)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [July 15, 2021, 4:08pm UTC](https://discourse.julialang.org/t/compat-section-in-project-toml-do-i-need-to-include-the-compat-of-my-dependencies/64691 "2021-07-15T16:08:06Z")

</div>

say one of my dependencies only works with Julia 1.6, do I need to add also a entry julia = "1.6" to the compat section of my Project.toml?

---

## [Print SUnitRange within tuple as is, not as a vector](https://discourse.julialang.org/t/print-sunitrange-within-tuple-as-is-not-as-a-vector/64678)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [July 15, 2021, 2:02pm UTC](https://discourse.julialang.org/t/print-sunitrange-within-tuple-as-is-not-as-a-vector/64678 "2021-07-15T14:02:46Z")

</div>

I am wondering how to coax show etc to print a StaticArrays.SUnitRange as is, not as a vector of indices. I tried the usual suspects for options in IOContext, didn’t work. I am not even sure if this is intended or a bug. …

---

## [Sparse matrix product causes unnecessary casting to "Any" thereby causing issues?](https://discourse.julialang.org/t/sparse-matrix-product-causes-unnecessary-casting-to-any-thereby-causing-issues/64565)

<div class="topic-metadata">

**Author:** [@Annette\_F](https://discourse.julialang.org/u/Annette_F)\
**Replies:** 11\
**Last updated:** [July 15, 2021, 9:11am UTC](https://discourse.julialang.org/t/sparse-matrix-product-causes-unnecessary-casting-to-any-thereby-causing-issues/64565 "2021-07-15T09:11:34Z")

</div>

Hi all, I have a large sparse matrix A ( its size is (2823,2823 ) its type is SparceMatrixCSC{ Integer, Int64} ) with 0/1 values only. I want to get a sparse matrix B = A^2, and get the largest value in this matrix. …

---

## [Finding specific methods in Julia documentation](https://discourse.julialang.org/t/finding-specific-methods-in-julia-documentation/34690)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 12\
**Last updated:** [July 15, 2021, 8:09am UTC](https://discourse.julialang.org/t/finding-specific-methods-in-julia-documentation/34690 "2021-07-15T08:09:29Z")

</div>

I’m trying to find the 1.X equivalent for flipdim. The intertubes told me that it had been replaced by reverse with a dims keyword https://github.com/JuliaLang/julia/pull/26369 Humorously i can’t figure out how it’s s…

---

## [PDE simulation with ETD2. For computing quasicrystal](https://discourse.julialang.org/t/pde-simulation-with-etd2-for-computing-quasicrystal/64648)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 8\
**Last updated:** [July 15, 2021, 7:47am UTC](https://discourse.julialang.org/t/pde-simulation-with-etd2-for-computing-quasicrystal/64648 "2021-07-15T07:47:49Z")

</div>

Dear all, I am trying to solve a pde using the time stepper ETD2 in Fourier space. My goal was to play with the results of the paper Subramanian, P., A. J. Archer, E. Knobloch, and A. M. Rucklidge. “Spatially Localize…

---

## [Create Template without version control](https://discourse.julialang.org/t/create-template-without-version-control/64450)

<div class="topic-metadata">

**Author:** [@Dustin\_Hess](https://discourse.julialang.org/u/Dustin_Hess)\
**Replies:** 10\
**Last updated:** [July 15, 2021, 3:22am UTC](https://discourse.julialang.org/t/create-template-without-version-control/64450 "2021-07-15T03:22:19Z")

</div>

I read through the doc for PkgTemplates and cannot figure out how to create a package that dose not have a .git folder. I need this way because because I am using Bitbucket and packages are private. Bitbucket will create…

---

## [Matlab versus Julia](https://discourse.julialang.org/t/matlab-versus-julia/64469)

<div class="topic-metadata">

**Author:** [@asaretto](https://discourse.julialang.org/u/asaretto)\
**Replies:** 33\
**Last updated:** [July 15, 2021, 1:43am UTC](https://discourse.julialang.org/t/matlab-versus-julia/64469 "2021-07-15T01:43:06Z")

</div>

Hi guys, I am new to Julia. I have been using Matlab for many years. I have been told that Julia can offer great improvements in terms of performance. After doing a very preliminary intro course on Julia I started hackin…

---

## [The best way to define two or more arrays, similar to a given one](https://discourse.julialang.org/t/the-best-way-to-define-two-or-more-arrays-similar-to-a-given-one/64519)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 10\
**Last updated:** [July 15, 2021, 1:07am UTC](https://discourse.julialang.org/t/the-best-way-to-define-two-or-more-arrays-similar-to-a-given-one/64519 "2021-07-15T01:07:00Z")

</div>

Is there a method to avoid repeating similar(u) in the code below? To be more precise, I define a parameterized surface (u,v)-\>(f(u,v), g(u,v), h(u,v)) with parameters in a rectangle \[a, b\] x \[c,d\]: ru = a:0.1:b rv = …

---

## [Weave.jl: order of text and plots](https://discourse.julialang.org/t/weave-jl-order-of-text-and-plots/64656)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 4\
**Last updated:** [July 14, 2021, 9:51pm UTC](https://discourse.julialang.org/t/weave-jl-order-of-text-and-plots/64656 "2021-07-14T21:51:28Z")

</div>

Weaving a .jmd file like this within a \`\`\`julia code block: println("line 1") println("line 2") display(plot(rand(10))) println("line 3") println("line 4") gives this both in html and pdf output: Is there a way t…

---

## [X === nothing vs x isa Nothing](https://discourse.julialang.org/t/x-nothing-vs-x-isa-nothing/64546)

<div class="topic-metadata">

**Author:** [@dpkwhan](https://discourse.julialang.org/u/dpkwhan)\
**Replies:** 14\
**Last updated:** [July 14, 2021, 9:44pm UTC](https://discourse.julialang.org/t/x-nothing-vs-x-isa-nothing/64546 "2021-07-14T21:44:48Z")

</div>

Which one is preferred? Why?

---

## [Difference between collect(x) and Array(x)?](https://discourse.julialang.org/t/difference-between-collect-x-and-array-x/64652)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [July 14, 2021, 6:02pm UTC](https://discourse.julialang.org/t/difference-between-collect-x-and-array-x/64652 "2021-07-14T18:02:04Z")

</div>

Is there any difference in the behavior of collect(x) vs Array(x)? collect(element\_type, collection) Return an Array with the given element type of all items in a collection or iterable. The result has the same sh…

---

## [Find most specific type](https://discourse.julialang.org/t/find-most-specific-type/64528)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 4\
**Last updated:** [July 14, 2021, 5:37pm UTC](https://discourse.julialang.org/t/find-most-specific-type/64528 "2021-07-14T17:37:12Z")

</div>

given a collection of type tupels. Like \[Tuple{Int, Int}, Tuple{Integer, Integer}, Tuple{T, T} where T\<: Real\] how can I find which is the most specific? I assume julia has a fast way of doing this since this is what…

---

## [Efficient rounding of multiplication by irrational numbers](https://discourse.julialang.org/t/efficient-rounding-of-multiplication-by-irrational-numbers/64647)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 0\
**Last updated:** [July 14, 2021, 5:07pm UTC](https://discourse.julialang.org/t/efficient-rounding-of-multiplication-by-irrational-numbers/64647 "2021-07-14T17:07:00Z")

</div>

I have a small Julia package for quantum computing - performing simple qubit calculations (I know that there are other, high quality, quantum computations for Julia, but I like to use my package which is tailored for my …

---

## [Display banner when executing julia from cmd?](https://discourse.julialang.org/t/display-banner-when-executing-julia-from-cmd/64601)

<div class="topic-metadata">

**Author:** [@fredih](https://discourse.julialang.org/u/fredih)\
**Replies:** 2\
**Last updated:** [July 14, 2021, 4:36pm UTC](https://discourse.julialang.org/t/display-banner-when-executing-julia-from-cmd/64601 "2021-07-14T16:36:50Z")

</div>

I would like the welcome banner that is displayed when you enter the REPL to be printed when I execute something like julia myCode.jl in Window’s cmd. Is there a way to do so?

---

## [Animation bug](https://discourse.julialang.org/t/animation-bug/60982)

<div class="topic-metadata">

**Author:** [@peteole](https://discourse.julialang.org/u/peteole)\
**Replies:** 1\
**Last updated:** [July 14, 2021, 4:05pm UTC](https://discourse.julialang.org/t/animation-bug/60982 "2021-07-14T16:05:48Z")

</div>

Hi, I am trying to get into animations using the Plots package. I am following this tutorial: Animations · Plots However when trying to execute the program I get the following error: ERROR: LoadError: failed process: …

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

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