Commit c5e7b87
Fix np.load allow_pickle=False to work correctly with .npz format (#1329)
* Initial plan
* Fix np.load allow_pickle=False to work with .npz NpzFile format
- Replace .item().get(key) with [key] dict-style access on NpzFile
- Remove variables instance attribute; use local variable instead
- Add type annotation for variables local var as np.lib.npyio.NpzFile
- Add allow_pickle=False to embeddings.npy load in words_spelling_correction.py
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>1 parent 2c19966 commit c5e7b87
2 files changed
Lines changed: 18 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| |||
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 103 | + | |
| 104 | + | |
108 | 105 | | |
| 106 | + | |
| 107 | + | |
109 | 108 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 109 | + | |
113 | 110 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 111 | + | |
117 | 112 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 113 | + | |
121 | 114 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 115 | + | |
126 | 116 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 117 | + | |
130 | 118 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 119 | + | |
134 | 120 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 121 | + | |
138 | 122 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 123 | + | |
142 | 124 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 125 | + | |
146 | 126 | | |
147 | | - | |
| 127 | + | |
148 | 128 | | |
149 | | - | |
| 129 | + | |
150 | 130 | | |
151 | 131 | | |
152 | 132 | | |
| |||
0 commit comments