# General Usage

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

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

**Page:** 636

---

## [Best pkg for symbolic mathematics at Julia](https://discourse.julialang.org/t/best-pkg-for-symbolic-mathematics-at-julia/55312)

<div class="topic-metadata">

**Author:** [@fms-1988](https://discourse.julialang.org/u/fms-1988)\
**Replies:** 4\
**Last updated:** [March 1, 2021, 3:01pm UTC](https://discourse.julialang.org/t/best-pkg-for-symbolic-mathematics-at-julia/55312 "2021-03-01T15:01:16Z")

</div>

I am currently using Sympy. The problem is that it was developed in Python. An alternative is pkg SymEngine, which was developed in C ++. My doubt is: is there a better Pkg than Sympy and SymEngine?

---

## [Is there a ready-made function to convert a Gumbo.jl parsed html table into a table like DataFrames.DataFrame?](https://discourse.julialang.org/t/is-there-a-ready-made-function-to-convert-a-gumbo-jl-parsed-html-table-into-a-table-like-dataframes-dataframe/55973)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 2\
**Last updated:** [March 1, 2021, 2:30pm UTC](https://discourse.julialang.org/t/is-there-a-ready-made-function-to-convert-a-gumbo-jl-parsed-html-table-into-a-table-like-dataframes-dataframe/55973 "2021-03-01T14:30:45Z")

</div>

I tried to read through Gumbo.jl pages but I don’t see a function to convert a table tag to a table. Does such functions exists or I need to roll my own?

---

## [Tabulated data are treated as rows of strings by CSV.File](https://discourse.julialang.org/t/tabulated-data-are-treated-as-rows-of-strings-by-csv-file/56247)

<div class="topic-metadata">

**Author:** [@arif](https://discourse.julialang.org/u/arif)\
**Replies:** 2\
**Last updated:** [March 1, 2021, 12:59pm UTC](https://discourse.julialang.org/t/tabulated-data-are-treated-as-rows-of-strings-by-csv-file/56247 "2021-03-01T12:59:00Z")

</div>

I am trying to get this table of data representing the SLy equation of state for a neutron star. CSV.File(HTTP.get("http://www.ioffe.ru/astro/NSG/NSEOS/sly4.dat").body) loads the data as strings of a single column inste…

---

## [In place sorting for views](https://discourse.julialang.org/t/in-place-sorting-for-views/56194)

<div class="topic-metadata">

**Author:** [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Replies:** 12\
**Last updated:** [March 1, 2021, 11:55am UTC](https://discourse.julialang.org/t/in-place-sorting-for-views/56194 "2021-03-01T11:55:21Z")

</div>

Maybe I am benchmarking it wrong, but it seems that sorting part of the vector (with the help of @views) is slower than sorting original vector. using BenchmarkTools v = rand(1000); v2 = rand(2000); v2\[500:1499\] .= v;…

---

## [Raspberry Pi record video to file and pipe frames](https://discourse.julialang.org/t/raspberry-pi-record-video-to-file-and-pipe-frames/50493)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 3\
**Last updated:** [March 1, 2021, 8:27am UTC](https://discourse.julialang.org/t/raspberry-pi-record-video-to-file-and-pipe-frames/50493 "2021-03-01T08:27:00Z")

</div>

I’m trying to record a video to a file while at the same time, extract frames from the video stream, on a Raspberry Pi with a Pi Cam. If anyone has a better idea on how to do this, please let me know. Here’s what I got…

---

## [Error: Unsatisfiable requirements detected for package](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package/54901)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 4\
**Last updated:** [March 1, 2021, 8:00am UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package/54901 "2021-03-01T08:00:00Z")

</div>

I am getting an error while adding packages to the julia: Error DataFrame (@v1.5) pkg\> add DataFrames Updating registry at \`C:\\Users\\.julia\\registries\\JuliaComputingRegistry\` Resolving package versions... ERROR: U…

---

## [Segfault running JuliaCall from R](https://discourse.julialang.org/t/segfault-running-juliacall-from-r/56229)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [March 1, 2021, 6:14am UTC](https://discourse.julialang.org/t/segfault-running-juliacall-from-r/56229 "2021-03-01T06:14:31Z")

</div>

julia version 1.5.3 R version 4.0.3 (2020-10-10) NixOS unstable \> JuliaCall::julia\_setup() Julia version 1.5.3 at location /nix/store/lb43a78rgdbpfa198cymvxir92ns8hx4-julia-1.5.3/bin will be used. Loading setup scri…

---

## [Parallelizing interpolation? (BoundsError)](https://discourse.julialang.org/t/parallelizing-interpolation-boundserror/56221)

<div class="topic-metadata">

**Author:** [@taeukseo](https://discourse.julialang.org/u/taeukseo)\
**Replies:** 2\
**Last updated:** [March 1, 2021, 5:18am UTC](https://discourse.julialang.org/t/parallelizing-interpolation-boundserror/56221 "2021-03-01T05:18:31Z")

</div>

Hi, I am new to Julia and I have been trying to use Interpolations.jl to obtain interpolated values for grids. At some point, the number of points became quite large and I felt I should try to parallelize the code but ha…

---

## [Why findall() function is super slow?](https://discourse.julialang.org/t/why-findall-function-is-super-slow/56222)

<div class="topic-metadata">

**Author:** [@Nova](https://discourse.julialang.org/u/Nova)\
**Replies:** 5\
**Last updated:** [March 1, 2021, 3:55am UTC](https://discourse.julialang.org/t/why-findall-function-is-super-slow/56222 "2021-03-01T03:55:11Z")

</div>

Here is an example and I’m just wondering why it takes 51 mS to do this considering the input size is very small. aa = \[1,2,3,4,5,6\] bb = \[2,5\] @time findall(x-\>x==bb, aa) julia\> @time findall(x-\>in(x, bb), aa) 0.051…

---

## [Radial basis function (RBF2D) from ADCME.jl returns MethodError](https://discourse.julialang.org/t/radial-basis-function-rbf2d-from-adcme-jl-returns-methoderror/55598)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 23\
**Last updated:** [March 1, 2021, 1:03am UTC](https://discourse.julialang.org/t/radial-basis-function-rbf2d-from-adcme-jl-returns-methoderror/55598 "2021-03-01T01:03:38Z")

</div>

I am trying this tutorial for raidal basis function using ADCME.jl package. When I execute the code, I get a method error: using ADCME # use centers on a uniform grid n = 5 h = 1/n xc = Float64\[\] yc = Float64\[\] for …

---

## [Convert sqlite data to dataframe without nullable type](https://discourse.julialang.org/t/convert-sqlite-data-to-dataframe-without-nullable-type/689)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 9\
**Last updated:** [March 1, 2021, 12:26am UTC](https://discourse.julialang.org/t/convert-sqlite-data-to-dataframe-without-nullable-type/689 "2021-03-01T00:26:30Z")

</div>

Hi all- I am working with an sqlite database, but don’t really want to use the nullableArrays type. Is there a way to read the database as a regular dataframe or to easily convert to a regular dataframe? Thanks.

---

## [Recommended way to delete user-defined variables](https://discourse.julialang.org/t/recommended-way-to-delete-user-defined-variables/56209)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 4\
**Last updated:** [February 28, 2021, 8:34pm UTC](https://discourse.julialang.org/t/recommended-way-to-delete-user-defined-variables/56209 "2021-02-28T20:34:08Z")

</div>

I currently delete all my user-defined variables like this. varinfo() variable1, variable2, variable3 = fill(nothing, 3) Is there a way to make varinfo() output an array of only user-defined variable names instead of a…

---

## [Does Julia have equivalent of Python: DF.column.map( dict )](https://discourse.julialang.org/t/does-julia-have-equivalent-of-python-df-column-map-dict/47048)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 8\
**Last updated:** [February 28, 2021, 6:55pm UTC](https://discourse.julialang.org/t/does-julia-have-equivalent-of-python-df-column-map-dict/47048 "2021-02-28T18:55:14Z")

</div>

The best I could find is map( x → dict , DF.column )

---

## [Possible to do non-allocating Setfield operations on OffsetArray(::StaticVector)?](https://discourse.julialang.org/t/possible-to-do-non-allocating-setfield-operations-on-offsetarray-staticvector/55031)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 1\
**Last updated:** [February 28, 2021, 5:23pm UTC](https://discourse.julialang.org/t/possible-to-do-non-allocating-setfield-operations-on-offsetarray-staticvector/55031 "2021-02-28T17:23:20Z")

</div>

I have some code which initializes an array with a loop in a way where each element depends on the last element. I’m trying to make this work with StaticVectors so it can be non-allocating. I’ve found that I can use Setf…

---

## [Display Matrix{RGB{N0f8} with Genie](https://discourse.julialang.org/t/display-matrix-rgb-n0f8-with-genie/55544)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 5\
**Last updated:** [February 22, 2021, 12:03pm UTC](https://discourse.julialang.org/t/display-matrix-rgb-n0f8-with-genie/55544 "2021-02-22T12:03:45Z")

</div>

Say I have an image in the form of a matrix of RGB values: img = rand({RGB{N0f8}, 100, 100) How can I display that in my webapp using Genie, Stipple, etc?

---

## [Passing a StaticArray to sum throws an error](https://discourse.julialang.org/t/passing-a-staticarray-to-sum-throws-an-error/56159)

<div class="topic-metadata">

**Author:** [@mroavi](https://discourse.julialang.org/u/mroavi)\
**Replies:** 2\
**Last updated:** [February 28, 2021, 12:23pm UTC](https://discourse.julialang.org/t/passing-a-staticarray-to-sum-throws-an-error/56159 "2021-02-28T12:23:38Z")

</div>

Any idea why sum throws an error when given a StaticArray ? (I’m using Julia 1.5.3) using StaticArrays input = @SArray rand(2,2,2); sum(input, dims=(1,2)) # throws error Error: ERROR: LoadError: MethodError: no method…

---

## [Is there documentation on how to use MKL with libblastrampoline](https://discourse.julialang.org/t/is-there-documentation-on-how-to-use-mkl-with-libblastrampoline/56108)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [February 28, 2021, 8:48am UTC](https://discourse.julialang.org/t/is-there-documentation-on-how-to-use-mkl-with-libblastrampoline/56108 "2021-02-28T08:48:37Z")

</div>

Now that https://github.com/JuliaLang/julia/pull/39455 has been merged, is there documentation on how to use MKL blas via libblastrampoline?

---

## [Finding array indices without creating an array using vectors?](https://discourse.julialang.org/t/finding-array-indices-without-creating-an-array-using-vectors/56125)

<div class="topic-metadata">

**Author:** [@taeukseo](https://discourse.julialang.org/u/taeukseo)\
**Replies:** 15\
**Last updated:** [February 27, 2021, 10:12pm UTC](https://discourse.julialang.org/t/finding-array-indices-without-creating-an-array-using-vectors/56125 "2021-02-27T22:12:56Z")

</div>

I apologize for the poor phrasing of the question - it sounds like an oxymoron! :neutral\_face: I have been struggling to write a function F which, given: vectors of sizes N1, N2, N3… etc a number 1\<= i \<= N1 \* N2 \* N…

---

## [Issues with Starting Julia: Juno/Atom/Julia](https://discourse.julialang.org/t/issues-with-starting-julia-juno-atom-julia/56062)

<div class="topic-metadata">

**Author:** [@atparedes](https://discourse.julialang.org/u/atparedes)\
**Replies:** 2\
**Last updated:** [February 27, 2021, 5:40pm UTC](https://discourse.julialang.org/t/issues-with-starting-julia-juno-atom-julia/56062 "2021-02-27T17:40:27Z")

</div>

I recently install Julia 1.5.3 and I am having issues getting it to start using Juno/Atom: julia\> Julia has exited. Press Enter to start a new session. Starting Julia… I saw several discussions on this issues, but w…

---

## [Optimize function with complex square root](https://discourse.julialang.org/t/optimize-function-with-complex-square-root/56058)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 12\
**Last updated:** [February 27, 2021, 5:24pm UTC](https://discourse.julialang.org/t/optimize-function-with-complex-square-root/56058 "2021-02-27T17:24:32Z")

</div>

Hello, I am writing a routine to store a matrix that contains the values of f(x, z) = \\frac{1}{\\sqrt{1-x^2}} \\times \\text{real}\\left(\\frac{\\sqrt{z-1}\\sqrt{z+1}}{z-x}\\right) for \\sim 1000 real values x \\in \[-1, 1\] and \\…

---

## [\[Solved\] CSV.write(), file opens correctly in excel, but wrong layout in text](https://discourse.julialang.org/t/solved-csv-write-file-opens-correctly-in-excel-but-wrong-layout-in-text/56130)

<div class="topic-metadata">

**Author:** [@AIRoebl](https://discourse.julialang.org/u/AIRoebl)\
**Replies:** 2\
**Last updated:** [February 27, 2021, 3:43pm UTC](https://discourse.julialang.org/t/solved-csv-write-file-opens-correctly-in-excel-but-wrong-layout-in-text/56130 "2021-02-27T15:43:55Z")

</div>

Hi, I hope someone can help me here, I’ve been banging away at this for a day now. I’m using CSV.write() to write a dataframe to a CSV file (.txt). The output opens perfectly in excel, but the layout isn’t right in the t…

---

## [Is there a method to check if a vector is "sortable"?](https://discourse.julialang.org/t/is-there-a-method-to-check-if-a-vector-is-sortable/56127)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 6\
**Last updated:** [February 27, 2021, 12:23pm UTC](https://discourse.julialang.org/t/is-there-a-method-to-check-if-a-vector-is-sortable/56127 "2021-02-27T12:23:35Z")

</div>

In a Decision Tree algorithm I implement an optimisation where I first sort the vector of data once and then I pick up the various items with searchsorted. All fine for integers, floats, even strings… but If the vector …

---

## [Multithread image processing with Cairo.jl / Luxor.jl possible?](https://discourse.julialang.org/t/multithread-image-processing-with-cairo-jl-luxor-jl-possible/55920)

<div class="topic-metadata">

**Author:** [@Fred](https://discourse.julialang.org/u/Fred)\
**Replies:** 5\
**Last updated:** [February 27, 2021, 12:00pm UTC](https://discourse.julialang.org/t/multithread-image-processing-with-cairo-jl-luxor-jl-possible/55920 "2021-02-27T12:00:35Z")

</div>

Hi, This is a toy program that draw circles on the Julia logo. It woks sequentially but when I try to do parallel image processing I have this error with Julia 1.5.3 up to date. julia: cairo-surface.c :2092 : \_cairo\_su…

---

## [C: get variables from embedded julia](https://discourse.julialang.org/t/c-get-variables-from-embedded-julia/56134)

<div class="topic-metadata">

**Author:** [@achjaj](https://discourse.julialang.org/u/achjaj)\
**Replies:** 0\
**Last updated:** [February 27, 2021, 10:39am UTC](https://discourse.julialang.org/t/c-get-variables-from-embedded-julia/56134 "2021-02-27T10:39:53Z")

</div>

Hello, is there any way how I can get a list of all variables (and their values) in the global scope from Julia embedded in a C/C++ application? Documentation is not very helpful in this case.

---

## [ERROR: LoadError: importing WaterLily into Main conflicts with an existing identifier](https://discourse.julialang.org/t/error-loaderror-importing-waterlily-into-main-conflicts-with-an-existing-identifier/56086)

<div class="topic-metadata">

**Author:** [@meck](https://discourse.julialang.org/u/meck)\
**Replies:** 3\
**Last updated:** [February 27, 2021, 10:20am UTC](https://discourse.julialang.org/t/error-loaderror-importing-waterlily-into-main-conflicts-with-an-existing-identifier/56086 "2021-02-27T10:20:05Z")

</div>

Hello, this is my first Julia Repo I am trying to run, so maybe it is a beginners Julia problem. However I want to ask this here as well, if I may. When trying to run a Script from folder examples I get the mentione…

---

## [Does anyone else find the behavior of \`Dict(::NamedTuple)\` a little funky:\`\`\`juli](https://discourse.julialang.org/t/does-anyone-else-find-the-behavior-of-dict-namedtuple-a-little-funky-juli/56050)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 27, 2021, 10:08am UTC](https://discourse.julialang.org/t/does-anyone-else-find-the-behavior-of-dict-namedtuple-a-little-funky-juli/56050 "2021-02-27T10:08:17Z")

</div>

does anyone else find the behavior of Dict(::NamedTuple) a little funky: julia&gt; kw = (default\_u0 = \[0., 0., 0.\], default\_p=\[0., 0., 0.\]) (default\_u0 = \[0.0, 0.0, 0.0\], default\_p = \[0.0, 0.0, 0.0\]) julia&gt; kwd = …

---

## [Converting between AxisArray like packages?](https://discourse.julialang.org/t/converting-between-axisarray-like-packages/52510)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 18\
**Last updated:** [February 27, 2021, 3:31am UTC](https://discourse.julialang.org/t/converting-between-axisarray-like-packages/52510 "2021-02-27T03:31:06Z")

</div>

In Julia there are many AxisArrays.jl like packages, that implement variants of an array with metadata attached to its axes. This means every once in a while, one has to convert arrays between these. After doing lots of…

---

## [Behavior of ImmutableDict](https://discourse.julialang.org/t/behavior-of-immutabledict/56107)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 4\
**Last updated:** [February 26, 2021, 11:59pm UTC](https://discourse.julialang.org/t/behavior-of-immutabledict/56107 "2021-02-26T23:59:29Z")

</div>

Can anyone explain why ImmutableDict works the way it does? I can’t specify the type when declaring it: # Produces MethodError. weapons = ImmutableDict{String,Int32}("Light-Rifle" =\> 100, "Plasma-Pistol" =\> 50) I can’…

---

## [Julia from the perspective of a pythonista](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956)

<div class="topic-metadata">

**Author:** [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Replies:** 121\
**Last updated:** [February 26, 2021, 10:41pm UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956 "2021-02-26T22:41:21Z")

</div>

Julia from the perspective of a pythonista Intruduction I will start this post with a brief description of myself. I have been writing code in the Python programming language for about 3 years. My main interest is in art…

---

## [Transforming a type](https://discourse.julialang.org/t/transforming-a-type/56118)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [February 26, 2021, 9:25pm UTC](https://discourse.julialang.org/t/transforming-a-type/56118 "2021-02-26T21:25:49Z")

</div>

I have a Person type and I want to make another type that’s similar but allows missing values in the fields. Is this possible? struct Person name::String age::Int end struct IncompletePerson name::Union{Str…

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

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