Skip to content

Commit 8fbfb74

Browse files
committed
Auto-generated commit
1 parent 2cbda4b commit 8fbfb74

File tree

6 files changed

+34
-6
lines changed

6 files changed

+34
-6
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-05-19)
7+
## Unreleased (2025-06-21)
88

99
<section class="features">
1010

@@ -29,6 +29,16 @@
2929

3030
<!-- /.features -->
3131

32+
<section class="bug-fixes">
33+
34+
### Bug Fixes
35+
36+
- [`4252199`](https://github.com/stdlib-js/stdlib/commit/42521999bf5751baf748fb1e9528c9c4b31a9116) - ensure byte offset is a multiple of data type byte length
37+
38+
</section>
39+
40+
<!-- /.bug-fixes -->
41+
3242
<section class="issues">
3343

3444
### Closed Issues
@@ -47,6 +57,7 @@ A total of 12 issues were closed in this release:
4757

4858
<details>
4959

60+
- [`4252199`](https://github.com/stdlib-js/stdlib/commit/42521999bf5751baf748fb1e9528c9c4b31a9116) - **fix:** ensure byte offset is a multiple of data type byte length _(by Athan Reines)_
5061
- [`4a70790`](https://github.com/stdlib-js/stdlib/commit/4a707903dfef7c2b56216000165706497d19a251) - **style:** add missing spaces _(by Philipp Burckhardt)_
5162
- [`32deb11`](https://github.com/stdlib-js/stdlib/commit/32deb11c6a2453748d8db9554b6bb3fdb73a077f) - **docs:** update related packages sections [(#3976)](https://github.com/stdlib-js/stdlib/pull/3976) _(by stdlib-bot)_
5263
- [`3c1789f`](https://github.com/stdlib-js/stdlib/commit/3c1789fdfe3ae56635ddf84fb5dfe229237794fa) - **docs:** add missing private annotations and decimals _(by Philipp Burckhardt)_

CONTRIBUTORS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ Ali Salesi <ali_sal1381@yahoo.com>
2121
AlyAbdelmoneim <148393799+AlyAbdelmoneim@users.noreply.github.com>
2222
Aman Bhansali <bhansali.1@iitj.ac.in>
2323
AmanBhadkariya <140033975+AmanBhadkariya@users.noreply.github.com>
24+
Amisha Chhajed <136238836+amishhaa@users.noreply.github.com>
2425
Amit Jimiwal <amitjimiwal45@gmail.com>
26+
Annamalai Prabu <apfossdev@gmail.com>
2527
Anshu Kumar <132515490+anxhukumar@users.noreply.github.com>
2628
Anshu Kumar <contact.anshukumar@protonmail.com>
2729
Anudeep Sanapala <anudeep0306@gmail.com>
30+
Aryan Bhirud <112156883+AryanBhirud@users.noreply.github.com>
2831
Athan Reines <kgryte@gmail.com>
2932
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
3033
Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
@@ -38,6 +41,7 @@ Daniel Killenberger <daniel.killenberger@gmail.com>
3841
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
3942
Debashis Maharana <debashismaharana7854@gmail.com>
4043
Deep Trivedi <128926685+thedeeppp@users.noreply.github.com>
44+
Deepak Singh <78257493+Deepak91168@users.noreply.github.com>
4145
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
4246
Dev Goel <135586571+corsairier@users.noreply.github.com>
4347
Dhanyabad behera <110620935+dhanyabad11@users.noreply.github.com>
@@ -53,6 +57,7 @@ Frank Kovacs <fran70kk@gmail.com>
5357
GK Bishnoi <gkishan1kyt@gmail.com>
5458
GURU PRASAD SHARMA <168292003+GURUPRASADSHARMA@users.noreply.github.com>
5559
Gaurav <gaurav70380@gmail.com>
60+
Gautam Kaushik <162317291+Kaushikgtm@users.noreply.github.com>
5661
Gautam sharma <gautamkrishnasharma1@gmail.com>
5762
Girish Garg <garggirish2020@gmail.com>
5863
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
@@ -80,6 +85,7 @@ Joris Labie <joris.labie1@gmail.com>
8085
Justin Dennison <justin1dennison@gmail.com>
8186
Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
8287
Karan Anand <anandkarancompsci@gmail.com>
88+
Karan Vasudevamurthy <karanlvm123@gmail.com>
8389
Karan Yadav <77043443+karanBRAVO@users.noreply.github.com>
8490
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
8591
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
@@ -89,6 +95,7 @@ Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
8995
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
9096
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
9197
Lalit Narayan Yadav <162928571+LalitNarayanYadav@users.noreply.github.com>
98+
Lokesh Ranjan <lokesh.ranjan.phe23@itbhu.ac.in>
9299
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
93100
MANI <77221000+Eternity0207@users.noreply.github.com>
94101
Mahfuza Humayra Mohona <mhmohona@gmail.com>
@@ -117,6 +124,7 @@ Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
117124
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
118125
Ori Miles <97595296+orimiles5@users.noreply.github.com>
119126
Philipp Burckhardt <pburckhardt@outlook.com>
127+
Pierre Forstmann <15964998+pierreforstmann@users.noreply.github.com>
120128
Prajjwal Bajpai <142303989+prajjwalbajpai@users.noreply.github.com>
121129
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
122130
Pranav Goswami <pranavchiku11@gmail.com>
@@ -146,6 +154,7 @@ Ryan Seal <splrk@users.noreply.github.com>
146154
Rylan Yang <137365285+rylany27@users.noreply.github.com>
147155
SAHIL KUMAR <168997976+sahilk45@users.noreply.github.com>
148156
SHIVAM YADAV <120725381+Shivam-1827@users.noreply.github.com>
157+
Sachin Raj <120590207+schnrj@users.noreply.github.com>
149158
Sahil Goyal <87982509+sahil20021008@users.noreply.github.com>
150159
Sai Avinash <120403424+nasarobot@users.noreply.github.com>
151160
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
@@ -166,10 +175,14 @@ Spandan Barve <contact@marsian.dev>
166175
Stephannie Jiménez Gacha <steff456@hotmail.com>
167176
Suhaib Ilahi <suhaib.elahi87@gmail.com>
168177
Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com>
178+
Swapnil Hajare <69076366+Swapnil-2502@users.noreply.github.com>
169179
Tanishq Ahuja <68651083+TheGEN1U5@users.noreply.github.com>
170180
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
171181
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
172182
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
183+
Tushar Bhardwaj <155543597+TusharBhardwaj441@users.noreply.github.com>
184+
Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
185+
Ujjwal Kirti <64329707+ujjwalkirti@users.noreply.github.com>
173186
Utkarsh <http://utkarsh11105@gmail.com>
174187
Utkarsh Raj <rajutkarsh2505@gmail.com>
175188
UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
234234
* @throws {TypeError} if provided only two arguments, the second argument must be a valid argument
235235
* @throws {TypeError} byte offset must be a nonnegative integer
236236
* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements
237+
* @throws {RangeError} byte offset must be a multiple of the data type size
238+
* @throws {TypeError} view length must be a positive multiple of the data type size
237239
* @returns {TypedArray} typed array instance
238240
*/
239241
function TypedArray() {
@@ -278,6 +280,9 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
278280
buf = fromArray( new DataView( new ArrayBuffer( arg.length*BYTES_PER_ELEMENT ) ), arg, isLE );
279281
} else if ( isArrayBuffer( arg ) ) {
280282
buf = new DataView( arg );
283+
if ( !isNonNegativeInteger( arg.byteLength/BYTES_PER_ELEMENT ) ) {
284+
throw new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );
285+
}
281286
} else if ( isObject( arg ) ) {
282287
if ( HAS_ITERATOR_SYMBOL === false ) {
283288
throw new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', arg ) );
@@ -1046,7 +1051,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
10461051
) {
10471052
// We need to copy source values...
10481053
tmp = [];
1049-
for ( i = 0; i < value.length; i++ ) {
1054+
for ( i = 0; i < N; i++ ) {
10501055
tmp.push( get( value, i ) );
10511056
}
10521057
sbuf = tmp;

0 commit comments

Comments
 (0)