为了发现dask,我目前正在实现一个K-Means算法。 要更新方法,我想使用groupBy,但我必须将我的dask.array转换为dask.dataframe,然后返回到dask.array:
'use strict';
module.exports = function (sequelize, DataTypes) {
var announcement = sequelize.define('announcements', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
title: DataTypes.STRING,
description: DataTypes.TEXT,
likes: DataTypes.INTEGER
}, {
classMethods: {
associate: function (models) {
/**
* an announcement is created by only one user
*/
announcement.belongsTo(models.users, {
as: 'Owner'
});
}
}
});
return announcement;
}
如果没有转换,有没有办法做到这一点?