{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Basic core"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This module contains all the basic functions we need in other modules of the fastai library (split with [`torch_core`](/torch_core.html#torch_core) that contains the ones requiring pytorch). Its documentation can easily be skipped at a first read, unless you want to know what a given function does."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [],
"source": [
"from fastai.gen_doc.nbdoc import *\n",
"from fastai.core import * "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Global constants"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`default_cpus = min(16, num_cpus())`
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Check functions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> has_arg(**`func`**, **`arg`**) → `bool`\n",
"\n",
"Check if `func` accepts `arg`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(has_arg)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Examples for two [`fastai.core`](/core.html#core) functions. Docstring shown before calling [`has_arg`](/core.html#has_arg) for reference\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"has_arg(download_url,'url')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"has_arg(index_row,'x')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"has_arg(index_row,'a')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> ifnone(**`a`**:`Any`, **`b`**:`Any`) → `Any`\n",
"\n",
"`a` if `a` is not None, otherwise `b`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(ifnone)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"5"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"param,alt_param = None,5\n",
"ifnone(param,alt_param)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1, 2, 3]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"param,alt_param = None,[1,2,3]\n",
"ifnone(param,alt_param)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> is1d(**`a`**:`Collection`\\[`T_co`\\]) → `bool`\n",
"\n",
"Return `True` if `a` is one-dimensional "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(is1d)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[ 0 1]\n",
" [ 2 3]\n",
" [ 4 5]\n",
" [ 6 7]\n",
" [ 8 9]\n",
" [10 11]]\n",
"False\n"
]
}
],
"source": [
"two_d_array = np.arange(12).reshape(6,2)\n",
"print( two_d_array )\n",
"print( is1d(two_d_array) )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"is1d(two_d_array.flatten())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> is_listy(**`x`**:`Any`) → `bool`"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(is_listy)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check if `x` is a `Collection`. `Tuple` or `List` qualify"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"some_data = [1,2,3]\n",
"is_listy(some_data)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"some_data = (1,2,3)\n",
"is_listy(some_data)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"False\n"
]
}
],
"source": [
"some_data = 1024\n",
"print( is_listy(some_data) )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
}
],
"source": [
"print( is_listy( [some_data] ) )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'a': 1, 'b': 2, 'c': 3}\n",
"dict_keys(['a', 'b', 'c'])\n"
]
}
],
"source": [
"some_data = dict([('a',1),('b',2),('c',3)])\n",
"print( some_data )\n",
"print( some_data.keys() )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"False\n",
"False\n"
]
}
],
"source": [
"print( is_listy(some_data) )\n",
"print( is_listy(some_data.keys()) )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
}
],
"source": [
"print( is_listy(list(some_data.keys())) )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> is_tuple(**`x`**:`Any`) → `bool`"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(is_tuple)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check if `x` is a `tuple`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"False\n"
]
}
],
"source": [
"print( is_tuple( [1,2,3] ) )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
}
],
"source": [
"print( is_tuple( (1,2,3) ) )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Collection related functions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> arange_of(**`x`**)\n",
"\n",
"Same as [`range_of`](/core.html#range_of) but returns an array. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(arange_of)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([0, 1, 2])"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"arange_of([5,6,7])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"numpy.ndarray"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(arange_of([5,6,7]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> array(**`a`**, **`dtype`**:`type`=***`None`***, **\\*\\*`kwargs`**) → `ndarray`\n",
"\n",
"Same as `np.array` but also handles generators. `kwargs` are passed to `np.array` with `dtype`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(array)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([1, 2, 3])"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"array([1,2,3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that after we call the generator, we do not reset. So the [`array`](/core.html#array) call has 5 less entries than it would if we ran from the start of the generator."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"100.01\n",
"101.01\n",
"102.01\n",
"103.01\n",
"104.01\n"
]
}
],
"source": [
"def data_gen():\n",
" i = 100.01\n",
" while i<200:\n",
" yield i\n",
" i += 1.\n",
"\n",
"ex_data_gen = data_gen()\n",
"for _ in range(5):\n",
" print(next(ex_data_gen))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([105.01, 106.01, 107.01, 108.01, ..., 196.01, 197.01, 198.01, 199.01])"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"array(ex_data_gen)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([100, 101, 102, 103, ..., 196, 197, 198, 199])"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ex_data_gen_int = data_gen()\n",
"\n",
"array(ex_data_gen_int,dtype=int) #Cast output to int array"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> arrays_split(**`mask`**:`ndarray`, **\\*`arrs`**:`NPArrayableList`) → `SplitArrayList`\n",
"\n",
"Given `arrs` is [a,b,...] and `mask`index - return[(a[mask],a[~mask]),(b[mask],b[~mask]),...]. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(arrays_split)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]\n",
"[14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]\n",
"[False False False False False False False False False False False True True True True]\n"
]
}
],
"source": [
"data_a = np.arange(15)\n",
"data_b = np.arange(15)[::-1]\n",
"\n",
"mask_a = (data_a > 10)\n",
"print(data_a)\n",
"print(data_b)\n",
"print(mask_a)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[(array([11, 12, 13, 14]),),\n",
" (array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),)]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"arrays_split(mask_a,data_a)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(15, 2)"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.vstack([data_a,data_b]).transpose().shape"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[(array([[11, 3],\n",
" [12, 2],\n",
" [13, 1],\n",
" [14, 0]]),), (array([[ 0, 14],\n",
" [ 1, 13],\n",
" [ 2, 12],\n",
" [ 3, 11],\n",
" [ 4, 10],\n",
" [ 5, 9],\n",
" [ 6, 8],\n",
" [ 7, 7],\n",
" [ 8, 6],\n",
" [ 9, 5],\n",
" [10, 4]]),)]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"arrays_split(mask_a,np.vstack([data_a,data_b]).transpose()) #must match on dimension 0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> chunks(**`l`**:`Collection`\\[`T_co`\\], **`n`**:`int`) → `Iterable`\n",
"\n",
"Yield successive `n`-sized chunks from `l`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(chunks)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can transform a `Collection` into an `Iterable` of 'n' sized chunks by calling [`chunks`](/core.html#chunks):"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0, 1]\n",
"[2, 3]\n",
"[4, 5]\n",
"[6, 7]\n",
"[8, 9]\n"
]
}
],
"source": [
"data = [0,1,2,3,4,5,6,7,8,9]\n",
"for chunk in chunks(data, 2):\n",
" print(chunk)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0, 1, 2]\n",
"[3, 4, 5]\n",
"[6, 7, 8]\n",
"[9]\n"
]
}
],
"source": [
"for chunk in chunks(data, 3):\n",
" print(chunk)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> df_names_to_idx(**`names`**:`IntsOrStrs`, **`df`**:`DataFrame`)\n",
"\n",
"Return the column indexes of `names` in `df`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(df_names_to_idx)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" a b\n",
"0 1 2\n",
"1 1 2\n",
"2 1 2\n"
]
}
],
"source": [
"ex_df = pd.DataFrame.from_dict({\"a\":[1,1,1],\"b\":[2,2,2]})\n",
"print(ex_df)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_names_to_idx('b',ex_df)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> extract_kwargs(**`names`**:`StrList`, **`kwargs`**:`KWArgs`)\n",
"\n",
"Extract the keys in `names` from the `kwargs`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(extract_kwargs)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'a': 2, 'some_list': [1, 2, 3], 'param': 'mean'}"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"key_word_args = {\"a\":2,\"some_list\":[1,2,3],\"param\":'mean'}\n",
"key_word_args"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'param': 'mean'} {'a': 2, 'some_list': [1, 2, 3]}\n"
]
}
],
"source": [
"(extracted_val,remainder) = extract_kwargs(['param'],key_word_args)\n",
"print( extracted_val,remainder )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> idx_dict(**`a`**)\n",
"\n",
"Create a dictionary value to index from `a`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(idx_dict)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'a': 0, 'b': 1, 'c': 2}"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"idx_dict(['a','b','c'])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> index_row(**`a`**:`Union`\\[`Collection`\\[`T_co`\\], `DataFrame`, `Series`\\], **`idxs`**:`Collection`\\[`int`\\]) → `Any`\n",
"\n",
"Return the slice of `a` corresponding to `idxs`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(index_row)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data = [0,1,2,3,4,5,6,7,8,9]\n",
"index_row(data,4)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"7"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"index_row(pd.Series(data),7)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" 0 | \n",
" 1 | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 9 | \n",
" 0 | \n",
"
\n",
" \n",
" | 1 | \n",
" 8 | \n",
" 1 | \n",
"
\n",
" \n",
" | 2 | \n",
" 7 | \n",
" 2 | \n",
"
\n",
" \n",
" | 3 | \n",
" 6 | \n",
" 3 | \n",
"
\n",
" \n",
" | 4 | \n",
" 5 | \n",
" 4 | \n",
"
\n",
" \n",
" | 5 | \n",
" 4 | \n",
" 5 | \n",
"
\n",
" \n",
" | 6 | \n",
" 3 | \n",
" 6 | \n",
"
\n",
" \n",
" | 7 | \n",
" 2 | \n",
" 7 | \n",
"
\n",
" \n",
" | 8 | \n",
" 1 | \n",
" 8 | \n",
"
\n",
" \n",
" | 9 | \n",
" 0 | \n",
" 9 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" 0 1\n",
"0 9 0\n",
"1 8 1\n",
"2 7 2\n",
"3 6 3\n",
"4 5 4\n",
"5 4 5\n",
"6 3 6\n",
"7 2 7\n",
"8 1 8\n",
"9 0 9"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_df = pd.DataFrame([data[::-1],data]).transpose()\n",
"data_df"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 2\n",
"1 7\n",
"Name: 7, dtype: int64"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"index_row(data_df,7)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> listify(**`p`**:`OptListOrItem`=***`None`***, **`q`**:`OptListOrItem`=***`None`***)\n",
"\n",
"Make `p` listy and the same length as `q`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(listify)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a']"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"to_match = np.arange(12)\n",
"listify('a',to_match)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['a', 'a', 'a', 'a', 'a']"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"listify('a',5)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[77.1, 77.1, 77.1]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"listify(77.1,3)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1, 2, 3]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"listify( (1,2,3) )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1, 2, 3]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"listify((1,2,3),('a','b','c'))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> random_split(**`valid_pct`**:`float`, **\\*`arrs`**:`NPArrayableList`) → `SplitArrayList`\n",
"\n",
"Randomly split `arrs` with `valid_pct` ratio. good for creating validation set. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(random_split)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Splitting is done here with `random.uniform()` so you may not get the exact split percentage for small data sets"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[[0, 1],\n",
" [2, 3],\n",
" [4, 5],\n",
" [6, 7],\n",
" [8, 9],\n",
" [10, 11],\n",
" [12, 13],\n",
" [14, 15],\n",
" [16, 17],\n",
" [18, 19]]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data = np.arange(20).reshape(10,2)\n",
"data.tolist()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[(array([[ 0, 1],\n",
" [ 2, 3],\n",
" [ 6, 7],\n",
" [ 8, 9],\n",
" [10, 11],\n",
" [16, 17],\n",
" [18, 19]]),), (array([[ 4, 5],\n",
" [12, 13],\n",
" [14, 15]]),)]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"random_split(0.20,data.tolist())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[(array([[ 0, 1],\n",
" [ 2, 3],\n",
" [ 4, 5],\n",
" [ 6, 7],\n",
" [ 8, 9],\n",
" [10, 11],\n",
" [12, 13],\n",
" [14, 15],\n",
" [16, 17],\n",
" [18, 19]]),), (array([], shape=(0, 2), dtype=int64),)]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"random_split(0.20,pd.DataFrame(data))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> range_of(**`x`**)\n",
"\n",
"Create a range from 0 to `len(x)`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(range_of)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[0, 1, 2]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"range_of([5,4,3])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"range_of(np.arange(10)[::-1])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> series2cat(**`df`**:`DataFrame`, **\\*`col_names`**)\n",
"\n",
"Categorifies the columns `col_names` in `df`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(series2cat)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" a | \n",
" b | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 1 | \n",
" f | \n",
"
\n",
" \n",
" | 1 | \n",
" 1 | \n",
" e | \n",
"
\n",
" \n",
" | 2 | \n",
" 1 | \n",
" f | \n",
"
\n",
" \n",
" | 3 | \n",
" 2 | \n",
" g | \n",
"
\n",
" \n",
" | 4 | \n",
" 2 | \n",
" g | \n",
"
\n",
" \n",
" | 5 | \n",
" 2 | \n",
" g | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" a b\n",
"0 1 f\n",
"1 1 e\n",
"2 1 f\n",
"3 2 g\n",
"4 2 g\n",
"5 2 g"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_df = pd.DataFrame.from_dict({\"a\":[1,1,1,2,2,2],\"b\":['f','e','f','g','g','g']})\n",
"data_df"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 f\n",
"1 e\n",
"2 f\n",
"3 g\n",
"4 g\n",
"5 g\n",
"Name: b, dtype: object"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_df['b']"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 f\n",
"1 e\n",
"2 f\n",
"3 g\n",
"4 g\n",
"5 g\n",
"Name: b, dtype: category\n",
"Categories (3, object): [e < f < g]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"series2cat(data_df,'b')\n",
"data_df['b']"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1\n",
"1 1\n",
"2 1\n",
"3 2\n",
"4 2\n",
"5 2\n",
"Name: a, dtype: category\n",
"Categories (2, int64): [1 < 2]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"series2cat(data_df,'a')\n",
"data_df['a']"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"split_kwargs_by_func[source]
\n",
"\n",
"> split_kwargs_by_func(**`kwargs`**, **`func`**)\n",
"\n",
"Split `kwargs` between those expected by `func` and the others. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(split_kwargs_by_func)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"({'url': 'http://fast.ai', 'dest': './'},\n",
" {'new_var': [1, 2, 3], 'testvalue': 42})"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"key_word_args = {'url':'http://fast.ai','dest':'./','new_var':[1,2,3],'testvalue':42}\n",
"split_kwargs_by_func(key_word_args,download_url)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> to_int(**`b`**:`Any`) → `Union`\\[`int`, `List`\\[`int`\\]\\]\n",
"\n",
"Convert `b` to an int or list of ints (if [`is_listy`](/core.html#is_listy)); raises exception if not convertible "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(to_int)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"to_int(3.1415)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1, 3, 7]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data = [1.2,3.4,7.25]\n",
"to_int(data)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> uniqueify(**`x`**:`Series`) → `List`\\[`T`\\]\n",
"\n",
"Return sorted unique values of `x`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(uniqueify)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['a', 'b', 'f', 'g']"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"uniqueify( pd.Series(data=['a','a','b','b','f','g']) )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Files management and downloads"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> download_url(**`url`**:`str`, **`dest`**:`str`, **`overwrite`**:`bool`=***`False`***, **`pbar`**:`ProgressBar`=***`None`***, **`show_progress`**=***`True`***, **`chunk_size`**=***`1048576`***, **`timeout`**=***`4`***, **`retries`**=***`5`***)\n",
"\n",
"Download `url` to `dest` unless it exists and not `overwrite`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(download_url)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> find_classes(**`folder`**:`Path`) → `FilePathList`\n",
"\n",
"List of label subdirectories in imagenet-style `folder`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(find_classes)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> join_path(**`fname`**:`PathOrStr`, **`path`**:`PathOrStr`=***`'.'`***) → `Path`\n",
"\n",
"Return `Path(path)/Path(fname)`, `path` defaults to current dir. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(join_path)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> join_paths(**`fnames`**:`FilePathList`, **`path`**:`PathOrStr`=***`'.'`***) → `FilePathList`\n",
"\n",
"Join `path` to every file name in `fnames`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(join_paths)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> loadtxt_str(**`path`**:`PathOrStr`) → `ndarray`\n",
"\n",
"Return `ndarray` of `str` of lines of text from `path`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(loadtxt_str)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> save_texts(**`fname`**:`PathOrStr`, **`texts`**:`StrList`)\n",
"\n",
"Save in `fname` the content of `texts`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(save_texts)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Multiprocessing"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> num_cpus() → `int`\n",
"\n",
"Get number of cpus "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(num_cpus)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> parallel(**`func`**, **`arr`**:`Collection`\\[`T_co`\\], **`max_workers`**:`int`=***`None`***)\n",
"\n",
"Call `func` on every element of `arr` in parallel using `max_workers`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(parallel)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> partition(**`a`**:`Collection`\\[`T_co`\\], **`sz`**:`int`) → `List`\\[`Collection`\\[`T_co`\\]\\]\n",
"\n",
"Split iterables `a` in equal parts of size `sz` "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(partition)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"partition_by_cores[source]
\n",
"\n",
"> partition_by_cores(**`a`**:`Collection`\\[`T_co`\\], **`n_cpus`**:`int`) → `List`\\[`Collection`\\[`T_co`\\]\\]\n",
"\n",
"Split data in `a` equally among `n_cpus` cores "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(partition_by_cores)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data block API"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> ItemBase(**`data`**:`Any`)\n",
"\n",
"Base item type in the fastai library. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(ItemBase, title_level=3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"All items used in fastai should subclass this. Must have a [`data`](/tabular.data.html#tabular.data) field that will be used when collating in mini-batches."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> apply_tfms(**`tfms`**:`Collection`\\[`T_co`\\], **\\*\\*`kwargs`**)\n",
"\n",
"Subclass this method if you want to apply data augmentation with `tfms` to this [`ItemBase`](/core.html#ItemBase). "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(ItemBase.apply_tfms)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> show(**`ax`**:`Axes`, **\\*\\*`kwargs`**)\n",
"\n",
"Subclass this method if you want to customize the way this [`ItemBase`](/core.html#ItemBase) is shown on `ax`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(ItemBase.show)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The default behavior is to set the string representation of this object as title of `ax`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> Category(**`data`**, **`obj`**) :: [`ItemBase`](/core.html#ItemBase)\n",
"\n",
"Basic class for single classification labels. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(Category, title_level=3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a [`Category`](/core.html#Category) with an `obj` of index [`data`](/tabular.data.html#tabular.data) in a certain classes list. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> EmptyLabel() :: [`ItemBase`](/core.html#ItemBase)\n",
"\n",
"Should be used for a dummy label. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(EmptyLabel, title_level=3)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"class MultiCategory[source]
\n",
"\n",
"> MultiCategory(**`data`**, **`obj`**, **`raw`**) :: [`ItemBase`](/core.html#ItemBase)\n",
"\n",
"Basic class for multi-classification labels. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(MultiCategory, title_level=3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a [`MultiCategory`](/core.html#MultiCategory) with an `obj` that is a collection of labels. [`data`](/tabular.data.html#tabular.data) corresponds to the one-hot encoded labels and `raw` is a list of associated string."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> FloatItem(**`obj`**) :: [`ItemBase`](/core.html#ItemBase)\n",
"\n",
"Basic class for float items. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(FloatItem)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Others"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> camel2snake(**`name`**:`str`) → `str`\n",
"\n",
"Change `name` from camel to snake style. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(camel2snake)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'device_data_loader'"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"camel2snake('DeviceDataLoader')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> even_mults(**`start`**:`float`, **`stop`**:`float`, **`n`**:`int`) → `ndarray`\n",
"\n",
"Build log-stepped array from `start` to `stop` in `n` steps. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(even_mults)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> func_args(**`func`**) → `bool`\n",
"\n",
"Return the arguments of `func`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(func_args)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> noop(**`x`**)"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(noop)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Return `x`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> one_hot(**`x`**:`Collection`\\[`int`\\], **`c`**:`int`)\n",
"\n",
"One-hot encode `x` with `c` classes. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(one_hot)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> show_some(**`items`**:`Collection`\\[`T_co`\\], **`n_max`**:`int`=***`5`***, **`sep`**:`str`=***`','`***)\n",
"\n",
"Return the representation of the first `n_max` elements in `items`. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(show_some)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> subplots(**`rows`**:`int`, **`cols`**:`int`, **`imgsize`**:`int`=***`4`***, **`figsize`**:`Optional`\\[`Tuple`\\[`int`, `int`\\]\\]=***`None`***, **`title`**=***`None`***, **\\*\\*`kwargs`**)\n",
"\n",
"Like `plt.subplots` but with consistent axs shape, `kwargs` passed to `fig.suptitle` with `title` "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(subplots)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"\n",
"> text2html_table(**`items`**:`Tokens`, **`widths`**:`Collection`\\[`int`\\]) → `str`\n",
"\n",
"Put the texts in `items` in an HTML table, `widths` are the widths of the columns in %. "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show_doc(text2html_table)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Undocumented Methods - Methods moved below this line will intentionally be hidden"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## New Methods - Please document or move to the undocumented section"
]
}
],
"metadata": {
"jekyll": {
"keywords": "fastai",
"summary": "Basic helper functions for the fastai library",
"title": "core"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}