{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 排序搜索计数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **如何通过第n列对一个数组进行排序**\n",
    "- `Z = np.random.randint(0,10,(3,3))`\n",
    "\n",
    "【知识点:排序】\n",
    "\n",
    "- (提示: argsort)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **对x的列进行排序，先按照最后一行排序，假如两数相等则按照倒数第二行排序**\n",
    "\n",
    "【知识点:排序】\n",
    "\n",
    "- (提示: lexsort)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **取出每一列比第三大的数字小的数**\n",
    "【知识点：排序】\n",
    "- （提示：np.argpartition/np.partition）"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **从`arr`中提取所有奇数。**\n",
    "\n",
    "- `arr = np.arange(10)`\n",
    "\n",
    "【知识点：搜索】\n",
    "- 如何从一维数组中提取满足指定条件的元素？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **将`arr`中的偶数元素替换为0。**\n",
    "\n",
    "- `arr = np.arange(10)`\n",
    "\n",
    "【知识点：搜索】\n",
    "- 如何用numpy数组中的另一个值替换满足条件的元素项？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### ** 将 `arr` 中的所有偶数元素替换为0，而不改变arr。**\n",
    "- `arr = np.arange(10)`\n",
    "\n",
    "【知识点：搜索】\n",
    "- 如何在不影响原始数组的情况下替换满足条件的元素项？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **获取给定数组a中前5个最大值的位置。**\n",
    "\n",
    "- `a = np.random.uniform(1, 50, 20)`\n",
    "\n",
    "【知识点：搜索】\n",
    "- 如何从numpy数组中获取最大的n个值的位置？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **删除一维numpy数组中所有NaN值。**\n",
    "\n",
    "- `a = np.array([1, 2, 3, np.nan, 5, 6, 7, np.nan])`\n",
    "\n",
    "【知识点：逻辑函数、搜索】\n",
    "- 如何删除numpy数组中的缺失值？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **获取给定数组a中比7大的数有多少。**\n",
    "\n",
    "- `a = np.random.uniform(1, 50, 20)`\n",
    "\n",
    "【知识点：搜索】"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 集合操作"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **获取数组a和数组b之间的公共项。**\n",
    "\n",
    "- `a = np.array([1, 2, 3, 2, 3, 4, 3, 4, 5, 6])`\n",
    "- `b = np.array([7, 2, 10, 2, 7, 4, 9, 4, 9, 8])`\n",
    "\n",
    "【知识点：集合操作】\n",
    "- 如何获取两个numpy数组之间的公共项？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **从数组a中删除数组b中的所有项。**\n",
    "- `a = np.array([1, 2, 3, 4, 5])`\n",
    "- `b = np.array([5, 6, 7, 8, 9])`\n",
    "\n",
    "【知识点：集合操作】\n",
    "- 如何从一个数组中删除存在于另一个数组中的项？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-13T13:49:02.928408Z",
     "start_time": "2020-10-13T13:49:02.919452Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1e-06"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python35",
   "language": "python",
   "name": "python35"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.10"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
