2025-11-01 08:00:00
本文基于 iris 数据集介绍 scikit-learn (https://scikit-learn.org/stable/) 的简单用法,并提供 R 语言的等价表示。
2025-10-31 08:00:00
创建数组
import tensorflow as tf
A = tf.constant([[1.0, -1.0], [1.0, 1.0]])
A
## <tf.Tensor: shape=(2, 2), dtype=float32, numpy=
## array([[ 1., -1.],
## [ 1., 1.]], dtype=float32)>
import numpy as np
a = np.array([[1., -1.], [1., 1.]])
a
## array([[ 1., -1.],
## [ 1., 1.]])
均值和矩阵乘法
2025-10-18 08:00:00
SciPy 是基于 NumPy 做科学计算的 Python 模块,它的官网没有类似 NumPy 和 Pandas 的快速入门文档,但有一个按功能分类的用户指南。本文介绍 SciPy 提供的基础算法,涵盖优化、积分、插值、特征值问题、代数方程、微分方程、统计学等功能。
2025-10-17 08:00:00
本文继《10分钟入门pandas》之后,又一篇快速入门 Python 模块的文章,来自 NumPy 的官网NumPy quickstart,也是要同步添加 R 代码实现。
2025-10-07 08:00:00
加载湖南省区县级行政区划边界地图数据
hunan_geo <- sf::read_sf("data/湖南省.json")
hunan_geo
## Simple feature collection with 122 features and 9 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 108.8 ymin: 24.64 xmax: 114.3 ymax: 30.13
## Geodetic CRS: WGS 84
## # A tibble: 122 × 10
## adcode name childrenNum level parent subFeatureIndex center centroid
## <int> <chr> <int> <chr> <chr> <int> <list> <list>
## 1 430102 芙蓉区 0 district "{ \"adco… 0 <dbl> <dbl>
## 2 430103 天心区 0 district "{ \"adco… 1 <dbl> <dbl>
## 3 430104 岳麓区 0 district "{ \"adco… 2 <dbl> <dbl>
## 4 430105 开福区 0 district "{ \"adco… 3 <dbl> <dbl>
## 5 430111 雨花区 0 district "{ \"adco… 4 <dbl> <dbl>
## 6 430112 望城区 0 district "{ \"adco… 5 <dbl> <dbl>
## 7 430121 长沙县 0 district "{ \"adco… 6 <dbl> <dbl>
## 8 430181 浏阳市 0 district "{ \"adco… 7 <dbl> <dbl>
## 9 430182 宁乡市 0 district "{ \"adco… 8 <dbl> <dbl>
## 10 430202 荷塘区 0 district "{ \"adco… 0 <dbl> <dbl>
## # ℹ 112 more rows
## # ℹ 2 more variables: acroutes <list>, geometry <MULTIPOLYGON [°]>
加载 2023 年湖南省各区县的数据(数据来自湖南省统计局发布的统计年鉴 2024)
2025-10-07 08:00:00
部分新建住房、白事活动现场、村服务中心。





村前水坝、村二进堂屋、部分旧住房。





卫生院门口、小学校门口、小庙。


再来点轻松的,只会做简单的饭菜,只够做自己的口味。