{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Getting help" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "using LinearAlgebra" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## For the standard library and installed packages\n", "\n", "For displaying a short hint (docstring) about a function or type, use the `?`:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "?eachcol" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "?tr" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "?Symmetric" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A frequent question one asks when trying to understand the structure of a new library or code is: What can I actually do with this type? This question is answered by the command `methodswith`, which lists all methods which has at least one argument of the specified type:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "methodswith(Diagonal)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To search more specifically, one may optionally specify a module or function:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "methodswith(Diagonal, tr)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The reverse question, namely what concrete methods do I have for one function, answers `methods`:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "methods(transpose)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Again a more specific version, which searches for methods with respect to a particular type is" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "methods(transpose, [Symmetric])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Exercise\n", "Explore the following functions and types using the tools mentioned above\n", "- `fill`\n", "- `ones`\n", "- `cholesky`\n", "- `eigen`\n", "- `qr`\n", "- `factorize`\n", "- `Tridiagonal`\n", "- `BunchKaufman`\n", "- `UpperHessenberg`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Julia Documentation\n", "\n", "The [Julia documentation](https://docs.julialang.org) is the starting point for finding answers about the **julia language**, any **`Base` package** or the **standard library**. If you suspect something is wrong with Julia itself, looking at the [list of issues](https://github.com/JuliaLang/julia/issues) or [list of Pull requests](https://github.com/JuliaLang/julia/issues) can be helpful.\n", "\n", "Most **Julia packages** have adopted similar standards to Base Julia with respect to documentation. They are usually developed on [github](https://github.com/topics/julia) and that's also a very good resource to find the project's homepage, installation tips or quickstart guides. Most have their own documentation somewhere linked as well (look out for an icon like ![](https://img.shields.io/badge/docs-stable-blue.svg)). If you have trouble with the package, it's also worth checking out the list of issues or pull requests to see if others have the same problem or people are already working on a fix. If not generally maintainers are more than happy if you get in touch there. Even if you are a Julia newbie: Be not afraid to send a patch or open a PR! Most maintainers are happy to help if you make the first step ;)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Julia Community\n", "\n", "The Julia community is open and friendly. The primary channel of communication is the [Julia Discourse](https://discourse.julialang.org/). There's also a [Julia Slack](https://julialang.slack.com/)." ] } ], "metadata": { "kernelspec": { "display_name": "Julia 1.3.0", "language": "julia", "name": "julia-1.3" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.3.0" } }, "nbformat": 4, "nbformat_minor": 2 }